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

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

Issue 1415103006: Non-Local Join for Media Router and Presentation API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing ChromeOS System Tray Test Created 4 years, 11 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_router.h
diff --git a/chrome/browser/media/router/media_router.h b/chrome/browser/media/router/media_router.h
index 2de52f950484d141e5fd8d790785509405b22439..a7ee14dac87b87760d322102a7f294e84ece8ad2 100644
--- a/chrome/browser/media/router/media_router.h
+++ b/chrome/browser/media/router/media_router.h
@@ -34,7 +34,8 @@ class MediaSinksObserver;
class PresentationConnectionStateObserver;
class PresentationSessionMessagesObserver;
-// Type of callback used in |CreateRoute()| and |JoinRoute()|. Callback is
+// Type of callback used in |CreateRoute()|, |JoinRoute()|, and
+// |ConnectRouteByRouteId()|. Callback is
// invoked when the route request either succeeded or failed.
// On success:
// |route|: The route created or joined.
@@ -87,6 +88,23 @@ class MediaRouter : public KeyedService {
content::WebContents* web_contents,
const std::vector<MediaRouteResponseCallback>& callbacks) = 0;
+ // Creates a route and connects it to an existing route identified by
+ // |route_id|. |route_id| must refer to a non-local route, unnassociated with
+ // a Presentation ID, because a new Presentation ID will be created.
+ // |source|: The source to route to the existing route.
+ // |route_id|: Route ID of the existing route.
+ // |origin|, |web_contents|: Origin and WebContents of the join route request.
+ // Used for validation when enforcing same-origin and/or same-tab scope.
+ // (See CreateRoute documentation).
+ // Each callback in |callbacks| is invoked with a response indicating
+ // success or failure, in the order they are listed.
+ virtual void ConnectRouteByRouteId(
+ const MediaSource::Id& source_id,
+ const MediaRoute::Id& route_id,
+ const GURL& origin,
+ content::WebContents* web_contents,
+ const std::vector<MediaRouteResponseCallback>& callbacks) = 0;
+
// Joins an existing route identified by |presentation_id|.
// |source|: The source to route to the existing route.
// |presentation_id|: Presentation ID of the existing route.
« no previous file with comments | « chrome/browser/media/android/router/media_router_android.cc ('k') | chrome/browser/media/router/media_router.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698