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

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: Use url::Origin for serializing origins, rebase 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 a17ae34dc1b68ec87f9a951184ecb1a329690ad5..040f480d46af088ff551a02905075b6c3ada5498 100644
--- a/chrome/browser/ui/webui/media_router/media_router_ui.h
+++ b/chrome/browser/ui/webui/media_router/media_router_ui.h
@@ -126,6 +126,14 @@ class MediaRouterUI : public ConstrainedWebDialogUI,
const std::string& domain,
MediaCastMode cast_mode);
+ // Returns true if the cast mode last chosen for the current origin is tab
+ // mirroring.
+ bool UserSelectedTabMirroringForCurrentOrigin() const;
+
+ // Records the cast mode selection for the current origin, 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;
@@ -274,6 +282,10 @@ class MediaRouterUI : public ConstrainedWebDialogUI,
// Otherwise returns an empty GURL.
GURL GetFrameURL() const;
+ // Returns the serialized origin for |initiator_|, or the serialization of an
+ // opaque origin ("null") if |initiator_| is not set.
+ std::string GetSerializedInitiatorOrigin() 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