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

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: Address Mark's comments 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 2365cdd9caa0a19eab37a22a437605b513bf66fe..b80f11f11a5e04a2702999e85face00536978702 100644
--- a/chrome/browser/media/router/media_source_helper.cc
+++ b/chrome/browser/media/router/media_source_helper.cc
@@ -23,6 +23,10 @@ constexpr char kDesktopMediaUrn[] = "urn:x-org.chromium.media:source:desktop";
constexpr char kTabRemotingUrnFormat[] =
"urn:x-org.chromium.media:source:tab_content_remoting:%d";
+// This value must be the same as |chrome.cast.AUTO_JOIN_PRESENTATION_ID| in the
+// component extension.
+const char kAutoJoinPresentationId[] = "auto-join";
mark a. foltz 2016/12/05 21:32:21 constexpr char
takumif 2016/12/06 02:21:57 Done.
+
} // namespace
MediaSource MediaSourceForTab(int tab_id) {
@@ -79,4 +83,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