| 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 0db284868dbffae2fdf5c0443c083c0db03cf89d..e69ca14af9a63d3c4a8ef3ba796f91ba9915a65b 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
|
| @@ -889,10 +889,18 @@ Polymer({
|
| // switch back to the SINK_PICKER view if the user is currently in the
|
| // ROUTE_DETAILS view.
|
| if (!this.currentRoute_ || !this.routeMap_[this.currentRoute_.id]) {
|
| - if (this.currentView_ == media_router.MediaRouterView.ROUTE_DETAILS)
|
| - this.showSinkList_();
|
| - else
|
| + if (this.currentView_ == media_router.MediaRouterView.ROUTE_DETAILS) {
|
| + // We may have an updated route to show for a device.
|
| + // We swap out |currentRoute_| (and consequently the route-details
|
| + // controls) to handle this.
|
| + this.currentRoute_ =
|
| + tempSinkToRouteMap[this.currentRoute_.sinkId] || null;
|
| +
|
| + if (!this.currentRoute_)
|
| + this.showSinkList_();
|
| + } else {
|
| this.currentRoute_ = null;
|
| + }
|
| }
|
|
|
| this.sinkToRouteMap_ = tempSinkToRouteMap;
|
|
|