| Index: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| index 155bc82031fd8bf9f4699defaae97426f2c577b6..ca53dd5c06ce7d04acf7214f816fecdc83a03406 100644
|
| --- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| +++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
|
| @@ -392,9 +392,9 @@ Polymer({
|
| /**
|
| * Whether the WebUI route controls should be shown instead of the
|
| * extensionview in the route details view.
|
| - * @type {boolean}
|
| + * @private {boolean}
|
| */
|
| - useWebUiRouteControls: {
|
| + useWebUiRouteControls_: {
|
| type: Boolean,
|
| value: false,
|
| },
|
| @@ -416,6 +416,16 @@ Polymer({
|
| type: Boolean,
|
| value: false,
|
| },
|
| +
|
| + /**
|
| + * Whether the WebUI route controls are available for use. Used for updating
|
| + * the value of |useWebUiRouteControls_|.
|
| + * @type {boolean}
|
| + */
|
| + webUiRouteControlsAvailable: {
|
| + type: Boolean,
|
| + value: false,
|
| + }
|
| },
|
|
|
| behaviors: [
|
| @@ -1825,7 +1835,7 @@ Polymer({
|
| * from route details view to the sink list view.
|
| */
|
| onRouteControllerInvalidated: function() {
|
| - if (this.useWebUiRouteControls &&
|
| + if (this.useWebUiRouteControls_ &&
|
| this.currentView_ == media_router.MediaRouterView.ROUTE_DETAILS) {
|
| this.currentRoute_ = null;
|
| this.showSinkList_();
|
| @@ -2386,7 +2396,9 @@ Polymer({
|
| showRouteDetails_: function(route) {
|
| this.currentRoute_ = route;
|
| this.currentView_ = media_router.MediaRouterView.ROUTE_DETAILS;
|
| - if (this.useWebUiRouteControls) {
|
| + this.useWebUiRouteControls_ =
|
| + this.webUiRouteControlsAvailable && route.supportsWebUiController;
|
| + if (this.useWebUiRouteControls_) {
|
| media_router.browserApi.onMediaControllerAvailable(route.id);
|
| }
|
| if (this.$$('route-details')) {
|
|
|