| Index: chrome/browser/resources/media_router/elements/route_details/route_details.js
|
| diff --git a/chrome/browser/resources/media_router/elements/route_details/route_details.js b/chrome/browser/resources/media_router/elements/route_details/route_details.js
|
| index 92ba82eccf98442b937c07126e479281c688eb5e..a6864458a147006fd06d2122aa772e0b23bb6a0a 100644
|
| --- a/chrome/browser/resources/media_router/elements/route_details/route_details.js
|
| +++ b/chrome/browser/resources/media_router/elements/route_details/route_details.js
|
| @@ -47,6 +47,15 @@ Polymer({
|
| },
|
|
|
| /**
|
| + * The text for the join casting button.
|
| + * @private {string}
|
| + */
|
| + joinCastingButtonText_: {
|
| + type: String,
|
| + value: loadTimeData.getString('joinCastingButton'),
|
| + },
|
| +
|
| + /**
|
| * The text for the stop casting button.
|
| * @private {string}
|
| */
|
| @@ -66,6 +75,24 @@ Polymer({
|
| type: Boolean,
|
| value: true,
|
| },
|
| +
|
| + /**
|
| + * Whether the join button is hidden.
|
| + * The join button is shown iff |route| specifies customControllerPath
|
| + * and the view can be loaded.
|
| + * @private {boolean}
|
| + */
|
| + canJoin: {type: Boolean, value: true},
|
| + },
|
| +
|
| + /**
|
| + * Fires a join-route-click event. This is called when the button to
|
| + * the current route is clicked.
|
| + *
|
| + * @private
|
| + */
|
| + joinRoute_: function() {
|
| + this.fire('join-route-click', {route: this.route});
|
| },
|
|
|
| /**
|
| @@ -86,10 +113,11 @@ Polymer({
|
| * @private
|
| */
|
| maybeLoadCustomController_: function() {
|
| - this.activityStatus_ = this.route ?
|
| - loadTimeData.getStringF('castingActivityStatus',
|
| - this.route.description) :
|
| - '';
|
| + this.activityStatus_ =
|
| + this.route ?
|
| + loadTimeData.getStringF(
|
| + 'castingActivityStatus', this.route.description) :
|
| + '';
|
|
|
| if (!this.route || !this.route.customControllerPath) {
|
| this.isCustomControllerHidden_ = true;
|
| @@ -106,12 +134,14 @@ Polymer({
|
|
|
| var that = this;
|
| extensionview.load(this.route.customControllerPath)
|
| - .then(function() {
|
| - // Load was successful; show the custom controller.
|
| - that.isCustomControllerHidden_ = false;
|
| - }, function() {
|
| - // Load was unsuccessful; fall back to default view.
|
| - that.isCustomControllerHidden_ = true;
|
| - });
|
| + .then(
|
| + function() {
|
| + // Load was successful; show the custom controller.
|
| + that.isCustomControllerHidden_ = false;
|
| + },
|
| + function() {
|
| + // Load was unsuccessful; fall back to default view.
|
| + that.isCustomControllerHidden_ = true;
|
| + });
|
| },
|
| });
|
|
|