summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/media_router/elements/route_details/route_details.js
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/resources/media_router/elements/route_details/route_details.js')
-rw-r--r--chromium/chrome/browser/resources/media_router/elements/route_details/route_details.js40
1 files changed, 18 insertions, 22 deletions
diff --git a/chromium/chrome/browser/resources/media_router/elements/route_details/route_details.js b/chromium/chrome/browser/resources/media_router/elements/route_details/route_details.js
index 43d1aba1cf2..39a4e86d87b 100644
--- a/chromium/chrome/browser/resources/media_router/elements/route_details/route_details.js
+++ b/chromium/chrome/browser/resources/media_router/elements/route_details/route_details.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
// This Polymer element shows information from media that is currently cast
-// to a device. It is assumed that |route| and |sink| correspond to each other.
+// to a device.
Polymer({
is: 'route-details',
@@ -28,12 +28,13 @@ Polymer({
},
/**
- * The sink to show.
- * @type {?media_router.Sink}
+ * The text for the join button.
+ * @private {string}
*/
- sink: {
- type: Object,
- value: null,
+ joinButtonText_: {
+ type: String,
+ readOnly: true,
+ value: loadTimeData.getString('joinButton'),
},
/**
@@ -42,7 +43,10 @@ Polymer({
*/
stopCastingButtonText_: {
type: String,
- value: loadTimeData.getString('stopCastingButton'),
+ readOnly: true,
+ value: function() {
+ return loadTimeData.getString('stopCastingButton');
+ },
},
/**
@@ -58,22 +62,23 @@ Polymer({
},
/**
- * Fires a back-click event. This is called when the back link is clicked.
+ * Fires a close-route-click event. This is called when the button to close
+ * the current route is clicked.
*
* @private
*/
- back_: function() {
- this.fire('back-click');
+ closeRoute_: function() {
+ this.fire('close-route-click', {route: this.route});
},
/**
- * Fires a close-route-click event. This is called when the button to close
+ * Fires a join-route-click event. This is called when the button to join
* the current route is clicked.
*
* @private
*/
- closeRoute_: function() {
- this.fire('close-route-click', {route: this.route});
+ joinRoute_: function() {
+ this.fire('join-route-click', {route: this.route});
},
/**
@@ -112,13 +117,4 @@ Polymer({
that.isCustomControllerHidden_ = true;
});
},
-
- /**
- * Handles a click on the close button by firing a close-button-click event.
- *
- * @private
- */
- onCloseButtonClick_: function() {
- this.fire('close-button-click');
- },
});