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

Unified Diff: chrome/browser/ui/webui/media_router/media_router_ui.h

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/ui/webui/media_router/media_router_ui.h
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui.h b/chrome/browser/ui/webui/media_router/media_router_ui.h
index dd329318b9f080aece510d8be5b168f4ab7758cc..8ef7eff6d1f315ed352d472657ea769d78582857 100644
--- a/chrome/browser/ui/webui/media_router/media_router_ui.h
+++ b/chrome/browser/ui/webui/media_router/media_router_ui.h
@@ -128,6 +128,14 @@ class MediaRouterUI : public ConstrainedWebDialogUI,
const std::string& domain,
MediaCastMode cast_mode);
+ // Returns the cast mode that user has last chosen for the current hostname.
+ // If user hasn't chosen any, this returns MediaCastMode::DEFAULT.
+ MediaCastMode GetCastModeSelectionForCurrentHost() const;
+
+ // Records the cast mode selection for the current hostname, unless the cast
+ // mode is MediaCastMode::DESKTOP_MIRROR.
+ void RecordCastModeSelection(MediaCastMode cast_mode);
+
// Returns the hostname of the default source's parent frame URL.
std::string GetPresentationRequestSourceName() const;
std::string GetTruncatedPresentationRequestSourceName() const;
@@ -276,6 +284,10 @@ class MediaRouterUI : public ConstrainedWebDialogUI,
// Otherwise returns an empty GURL.
GURL GetFrameURL() const;
+ // Returns the hostname (e.g. "cs.chromium.org") for |initiator_|, or an empty
+ // string if |initiator_| is not set.
+ std::string GetInitiatorHostname() const;
+
// Owned by the |web_ui| passed in the ctor, and guaranteed to be deleted
// only after it has deleted |this|.
MediaRouterWebUIMessageHandler* handler_;

Powered by Google App Engine
This is Rietveld 408576698