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

Unified Diff: chrome/browser/media/router/media_source_helper.cc

Issue 2517833004: [MR] Cancel auto-switching from tab mirroring to Cast SDK at page navigation based on user pref (Closed)
Patch Set: Rebase Created 4 years 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/media/router/media_source_helper.cc
diff --git a/chrome/browser/media/router/media_source_helper.cc b/chrome/browser/media/router/media_source_helper.cc
index 7c618b98484f291892191195998c60b5550a704d..cbe4420cb42603ff31d1a55b6a29f898dac5b5dc 100644
--- a/chrome/browser/media/router/media_source_helper.cc
+++ b/chrome/browser/media/router/media_source_helper.cc
@@ -24,6 +24,11 @@ constexpr char kTabRemotingUrnFormat[] =
"urn:x-org.chromium.media:source:tab_content_remoting:%d";
constexpr char kCastPresentationUrlDomain[] = "google.com";
constexpr char kCastPresentationUrlPath[] = "/cast";
+
+// This value must be the same as |chrome.cast.AUTO_JOIN_PRESENTATION_ID| in the
+// component extension.
+constexpr char kAutoJoinPresentationId[] = "auto-join";
+
} // namespace
MediaSource MediaSourceForTab(int tab_id) {
@@ -91,4 +96,8 @@ bool IsValidPresentationUrl(const GURL& url) {
return url.is_valid() && url.SchemeIsHTTPOrHTTPS();
}
+bool IsAutoJoinPresentationId(const std::string& presentation_id) {
+ return presentation_id == kAutoJoinPresentationId;
+}
+
} // namespace media_router

Powered by Google App Engine
This is Rietveld 408576698