Chromium Code Reviews| 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 060ad71b1f69f853c6ea283ef8df092b930838a8..89bb5943f58bb11a1cb0a5bba45b386afc6789e3 100644 |
| --- a/chrome/browser/media/router/media_router.mojom |
| +++ b/chrome/browser/media/router/media_router.mojom |
| @@ -143,6 +143,21 @@ interface MediaRouteProvider { |
| string origin, |
| int32 tab_id) => (MediaRoute? route, string? error_text); |
| + // Joins an established route given by |route_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. |
| + ConnectRouteByRouteId(string media_source, |
| + string route_id, |
| + string presentation_id, |
|
mark a. foltz
2015/12/16 07:17:34
Why does the mojo interface take a presentation id
matt.boetger
2015/12/18 23:37:15
It's the same reason CreateRoute is creating a pre
|
| + string origin, |
| + int32 tab_id) => |
| + (MediaRoute? route, string? error_text); |
| + |
| // Closes the route specified by |route_id|. |
| CloseRoute(string route_id); |
| @@ -162,12 +177,19 @@ interface MediaRouteProvider { |
| StopObservingMediaSinks(string media_source); |
| // Starts reporting the state of active media routes via |
| - // OnRoutesUpdated(). Querying will continue until |
| - // StopObservingMediaRoutes() is called. |
| - StartObservingMediaRoutes(); |
| - |
| - // Stops querying the state of all media routes. |
| - StopObservingMediaRoutes(); |
| + // OnRoutesUpdated() in the context of the |media_source|. |
| + // The |media_source| should be considered when returning joinable |
|
mark a. foltz
2015/12/16 07:17:34
What is the meaning of an empty media_source?
imcheng
2015/12/17 02:30:57
+1. It would be good to document what is the purpo
matt.boetger
2015/12/18 23:37:14
Added an explanation in the comments.
Done.
matt.boetger
2015/12/18 23:37:14
Done.
|
| + // routes in the OnRoutesUpdated() call. |
| + // Querying will continue until StopObservingMediaRoutes is called with the |
| + // same |media_source| (even if it's empty). |
| + StartObservingMediaRoutes(string? media_source); |
| + |
| + // Stops querying the state of all media routes in the context of |
| + // the |media_source|. StartObservingMediaRoutes has to be called |
| + // with the same |media_source| for this to have any effect. |
| + // Calling StopObservingMediaRoutes without a media_source will stop |
| + // any media routes queries associated with emtpy strings. |
| + StopObservingMediaRoutes(string? media_source); |
| // Called when the MediaRouter is ready to get the next batch of messages |
| // associated with |route_id|. |
| @@ -222,8 +244,11 @@ interface MediaRouter { |
| // Called when issues are reported for media routes. |
| OnIssue(Issue issue); |
| - // Called when list of routes has been updated. |
| - OnRoutesUpdated(array<MediaRoute> routes); |
| + // Called when list of routes has been updated in the context of the |
| + // calling |media_source|. The array |joinable_route_ids| should |
| + // contain route IDs of joinable routes found in the |routes| array. |
| + OnRoutesUpdated(string media_source, array<MediaRoute> routes, |
| + array<string> joinable_route_ids); |
| // Called when the overall availability of media sinks has been updated. |
| OnSinkAvailabilityUpdated(SinkAvailability availability); |