Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js

Issue 2487673003: [Media Router] Make per-hostname cast mode selections persist (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698