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

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

Issue 1173753003: [Media Router] Implement JoinRoute + update CreateRoute API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fix again x2 Created 5 years, 6 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
« no previous file with comments | « chrome/browser/media/router/media_router.h ('k') | chrome/browser/media/router/media_router_mojo_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/router/media_router.mojom
diff --git a/chrome/browser/media/router/media_router.mojom b/chrome/browser/media/router/media_router.mojom
index bf459870019aeb34cd70e418d543f098ab551b9c..34a06a40dbcbddd3d8e2aaca61462299e64c5881 100644
--- a/chrome/browser/media/router/media_router.mojom
+++ b/chrome/browser/media/router/media_router.mojom
@@ -84,12 +84,35 @@ struct Issue {
// chrome/browser/media/router/media_router.h
interface MediaRouter {
// Initiates a media route from |media_source| to |sink_id|.
+ // The presentation ID of the route created will be |presentation_id|, but it
+ // may be overridden by a provider implementation. The presentation ID will
+ // be used by the presentation API to refer to the created route.
+ // |origin| and |tab_id| may be passed in for enforcing same-origin and/or
+ // same-tab scopes.
+ // Since int types cannot be made optional, use -1 as |tab_id| in cases where
+ // it is not applicable.
// If the operation was successful, |route| will be defined and
// |error_text| will be null.
// If the operation failed, |route| will be null and |error_text|
// will be set.
- CreateRoute(string media_source, string sink_id) =>
- (MediaRoute? route, string? error_text);
+ CreateRoute(string media_source,
+ string sink_id,
+ string original_presentation_id,
+ string origin,
+ int32 tab_id) => (MediaRoute? route, string? error_text);
+
+ // Joins an established route given by |presentation_id|
+ // with |media_source|.
+ // |origin| and |tab_id| are used for validating same-origin/tab scopes.
+ // (See CreateRoute for additional documentation)
+ // If the operation was successful, |route| will be defined and
+ // |error_text| will be null.
+ // If the operation failed, |route| will be null and |error_text|
+ // will be set.
+ JoinRoute(string media_source,
+ string presentation_id,
+ string origin,
+ int32 tab_id) => (MediaRoute? route, string? error_text);
// Closes the route specified by |route_id|.
CloseRoute(string route_id);
« no previous file with comments | « chrome/browser/media/router/media_router.h ('k') | chrome/browser/media/router/media_router_mojo_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698