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 9e149ca7aadec32a7cad87d47b20e35c48e610cd..5c84497102ef14c342856f8db571a8abde88c4b7 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 |
@@ -2122,6 +2122,20 @@ Polymer({ |
}, |
/** |
+ * Sets the selected cast mode to the one associated with |castModeType|, |
+ * and rebuilds sinks to reflect the change. |
+ * @param {number} castModeType The type of the initial cast mode. |
+ */ |
+ setInitialCastMode: function(castModeType) { |
+ var initialCastMode = this.findCastModeByType_(castModeType); |
+ if (initialCastMode) { |
+ this.setShownCastMode_(initialCastMode); |
+ this.userHasSelectedCastMode_ = true; |
+ this.rebuildSinksToShow_(); |
+ } |
+ }, |
+ |
+ /** |
* Sets various focus and blur event handlers to handle showing search results |
* when the search input is focused. |
* @private |