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

Side by Side 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: Backwards Compatibility 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 namespace media_router { 26 namespace media_router {
27 27
28 class IssuesObserver; 28 class IssuesObserver;
29 class LocalMediaRoutesObserver; 29 class LocalMediaRoutesObserver;
30 class MediaRoutesObserver; 30 class MediaRoutesObserver;
31 class MediaSinksObserver; 31 class MediaSinksObserver;
32 class PresentationConnectionStateObserver; 32 class PresentationConnectionStateObserver;
33 class PresentationSessionMessagesObserver; 33 class PresentationSessionMessagesObserver;
34 34
35 // Type of callback used in |CreateRoute()| and |JoinRoute()|. Callback is 35 // Type of callback used in |CreateRoute()|, |JoinRoute()|, and
36 // |ConnectRouteByRouteId()|. Callback is
36 // invoked when the route request either succeeded or failed. 37 // invoked when the route request either succeeded or failed.
37 // On success: 38 // On success:
38 // |route|: The route created or joined. 39 // |route|: The route created or joined.
39 // |presentation_id|: 40 // |presentation_id|:
40 // The presentation ID of the route created or joined. In the case of 41 // The presentation ID of the route created or joined. In the case of
41 // |CreateRoute()|, the ID is generated by MediaRouter and is guaranteed to 42 // |CreateRoute()|, the ID is generated by MediaRouter and is guaranteed to
42 // be unique. 43 // be unique.
43 // |error|: Empty string. 44 // |error|: Empty string.
44 // On failure: 45 // On failure:
45 // |route|: nullptr 46 // |route|: nullptr
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // The caller may pass in nullptr for |web_contents| if tab is not applicable. 79 // The caller may pass in nullptr for |web_contents| if tab is not applicable.
79 // Each callback in |callbacks| is invoked with a response indicating 80 // Each callback in |callbacks| is invoked with a response indicating
80 // success or failure, in the order they are listed. 81 // success or failure, in the order they are listed.
81 virtual void CreateRoute( 82 virtual void CreateRoute(
82 const MediaSource::Id& source_id, 83 const MediaSource::Id& source_id,
83 const MediaSink::Id& sink_id, 84 const MediaSink::Id& sink_id,
84 const GURL& origin, 85 const GURL& origin,
85 content::WebContents* web_contents, 86 content::WebContents* web_contents,
86 const std::vector<MediaRouteResponseCallback>& callbacks) = 0; 87 const std::vector<MediaRouteResponseCallback>& callbacks) = 0;
87 88
89 // Creates a route and connects it to an existing route identified by
90 // |route_id|. This is used for non-local routes since no Presentation ID
mark a. foltz 2016/01/05 18:39:40 Maybe: "|route_id| must refer to a non-local rout
matt.boetger 2016/01/06 22:49:07 Done.
91 // is available.
92 // |source|: The source to route to the existing route.
93 // |route_id|: Route ID of the existing route.
94 // |origin|, |web_contents|: Origin and WebContents of the join route request.
95 // Used for validation when enforcing same-origin and/or same-tab scope.
96 // (See CreateRoute documentation).
97 // Each callback in |callbacks| is invoked with a response indicating
98 // success or failure, in the order they are listed.
99 virtual void ConnectRouteByRouteId(
100 const MediaSource::Id& source_id,
101 const MediaRoute::Id& route_id,
102 const GURL& origin,
103 content::WebContents* web_contents,
104 const std::vector<MediaRouteResponseCallback>& callbacks) = 0;
105
88 // Joins an existing route identified by |presentation_id|. 106 // Joins an existing route identified by |presentation_id|.
89 // |source|: The source to route to the existing route. 107 // |source|: The source to route to the existing route.
90 // |presentation_id|: Presentation ID of the existing route. 108 // |presentation_id|: Presentation ID of the existing route.
91 // |origin|, |web_contents|: Origin and WebContents of the join route request. 109 // |origin|, |web_contents|: Origin and WebContents of the join route request.
92 // Used for validation when enforcing same-origin and/or same-tab scope. 110 // Used for validation when enforcing same-origin and/or same-tab scope.
93 // (See CreateRoute documentation). 111 // (See CreateRoute documentation).
94 // Each callback in |callbacks| is invoked with a response indicating 112 // Each callback in |callbacks| is invoked with a response indicating
95 // success or failure, in the order they are listed. 113 // success or failure, in the order they are listed.
96 virtual void JoinRoute( 114 virtual void JoinRoute(
97 const MediaSource::Id& source, 115 const MediaSource::Id& source,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 LocalMediaRoutesObserver* observer) = 0; 225 LocalMediaRoutesObserver* observer) = 0;
208 226
209 // Removes the LocalMediaRoutesObserver |observer|. 227 // Removes the LocalMediaRoutesObserver |observer|.
210 virtual void UnregisterLocalMediaRoutesObserver( 228 virtual void UnregisterLocalMediaRoutesObserver(
211 LocalMediaRoutesObserver* observer) = 0; 229 LocalMediaRoutesObserver* observer) = 0;
212 }; 230 };
213 231
214 } // namespace media_router 232 } // namespace media_router
215 233
216 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ 234 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698