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

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

Issue 2310753002: Media Remoting: Data/Control plumbing between renderer and Media Router. (Closed)
Patch Set: Just a REBASE on ToT before commit. Created 4 years, 3 months 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.h
diff --git a/chrome/browser/media/router/media_source_helper.h b/chrome/browser/media/router/media_source_helper.h
index 0e2822a99025ea979ed7e9520a0385cce6e02f8e..e6c0c51b5c9911e2e514accd77fad1359fdacd7e 100644
--- a/chrome/browser/media/router/media_source_helper.h
+++ b/chrome/browser/media/router/media_source_helper.h
@@ -9,11 +9,16 @@
#include "chrome/browser/media/router/media_source.h"
+namespace content {
+class WebContents;
+}
+
namespace media_router {
// Helper library for protocol-specific media source object creation.
// Returns MediaSource URI depending on the type of source.
MediaSource MediaSourceForTab(int tab_id);
+MediaSource MediaSourceForTabContentRemoting(content::WebContents* contents);
MediaSource MediaSourceForDesktop();
MediaSource MediaSourceForCastApp(const std::string& app_id);
MediaSource MediaSourceForPresentationUrl(const std::string& presentation_url);
@@ -23,6 +28,10 @@ bool IsDesktopMirroringMediaSource(const MediaSource& source);
bool IsTabMirroringMediaSource(const MediaSource& source);
bool IsMirroringMediaSource(const MediaSource& source);
+// Parses the |source| and returns the SessionTabHelper tab ID referencing a
+// source tab. Returns a non-positive value on error.
+int TabIdFromMediaSource(const MediaSource& source);
+
// Checks that |source| is a parseable URN and is of a known type.
// Does not deeper protocol-level syntax checks.
bool IsValidMediaSource(const MediaSource& source);

Powered by Google App Engine
This is Rietveld 408576698