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

Side by Side Diff: chrome/browser/media/router/media_router.mojom

Issue 1415103006: Non-Local Join for Media Router and Presentation API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Fixes 2 Created 5 years 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 module media_router.interfaces; 5 module media_router.interfaces;
6 6
7 // Represents an output sink to which media can be routed. 7 // Represents an output sink to which media can be routed.
8 struct MediaSink { 8 struct MediaSink {
9 enum IconType { 9 enum IconType {
10 CAST, 10 CAST,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 SendRouteBinaryMessage(string media_route_id, array<uint8> data) 153 SendRouteBinaryMessage(string media_route_id, array<uint8> data)
154 => (bool sent); 154 => (bool sent);
155 155
156 // Starts querying for sinks capable of displaying |media_source|. 156 // Starts querying for sinks capable of displaying |media_source|.
157 StartObservingMediaSinks(string media_source); 157 StartObservingMediaSinks(string media_source);
158 158
159 // Stops querying sinks for |media_source|. 159 // Stops querying sinks for |media_source|.
160 StopObservingMediaSinks(string media_source); 160 StopObservingMediaSinks(string media_source);
161 161
162 // Starts reporting the state of active media routes via 162 // Starts reporting the state of active media routes via
163 // OnRoutesUpdated(). Querying will continue until 163 // OnRoutesUpdated() in the context of the |media_source|.
164 // StopObservingMediaRoutes() is called. 164 // The |media_source| should be considered when returning joinable
165 StartObservingMediaRoutes(); 165 // routes in the OnRoutesUpdated() call.
166 // Querying will continue until StopObservingMediaRoutes() is called.
mark a. foltz 2015/12/09 00:48:16 The media_source should be optional correct? Pleas
matt.boetger 2015/12/15 19:21:20 It was not my intention to make this optional. I
mark a. foltz 2015/12/16 07:17:34 I don't think so. Since we're passing back the me
167 StartObservingMediaRoutes(string media_source);
166 168
167 // Stops querying the state of all media routes. 169 // Stops querying the state of all media routes in the context of
168 StopObservingMediaRoutes(); 170 // the |media_source|.
171 StopObservingMediaRoutes(string media_source);
mark a. foltz 2015/12/09 00:48:16 What happens if the client calls Start(foo) Stop(
matt.boetger 2015/12/15 19:21:20 It was intended that if you call Start(foo) you mu
mark a. foltz 2015/12/16 07:17:34 Sure, it would be great to make this more explicit
169 172
170 // Called when the MediaRouter is ready to get the next batch of messages 173 // Called when the MediaRouter is ready to get the next batch of messages
171 // associated with |route_id|. 174 // associated with |route_id|.
172 // |messages| returned will contain the batch of messages. 175 // |messages| returned will contain the batch of messages.
173 // |messages| will be empty if |StopListeningForRouteMessages| was invoked. 176 // |messages| will be empty if |StopListeningForRouteMessages| was invoked.
174 // |error| indicates if a permanent error occurred. If true, then subsequent 177 // |error| indicates if a permanent error occurred. If true, then subsequent
175 // calls will also return with |error| being true. 178 // calls will also return with |error| being true.
176 ListenForRouteMessages(string route_id) => 179 ListenForRouteMessages(string route_id) =>
177 (array<RouteMessage> messages, bool error); 180 (array<RouteMessage> messages, bool error);
178 181
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // process. 216 // process.
214 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) => 217 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) =>
215 (string instance_id); 218 (string instance_id);
216 219
217 // Called when the Media Route Manager receives a new list of sinks. 220 // Called when the Media Route Manager receives a new list of sinks.
218 OnSinksReceived(string media_source, array<MediaSink> sinks); 221 OnSinksReceived(string media_source, array<MediaSink> sinks);
219 222
220 // Called when issues are reported for media routes. 223 // Called when issues are reported for media routes.
221 OnIssue(Issue issue); 224 OnIssue(Issue issue);
222 225
223 // Called when list of routes has been updated. 226 // Called when list of routes has been updated in the context of the
224 OnRoutesUpdated(array<MediaRoute> routes); 227 // calling |media_source|. The array |joinable_route_ids| should
228 // contain route IDs of joinable routes found in the |routes| array.
229 OnRoutesUpdated(string media_source, array<MediaRoute> routes,
230 array<string> joinable_route_ids);
mark a. foltz 2015/12/03 19:24:23 I would much rather add an is_joinable boolean fla
mark a. foltz 2015/12/09 00:48:16 You can ignore this comment.
matt.boetger 2015/12/15 19:21:20 Done.
matt.boetger 2015/12/15 19:21:20 Done.
225 231
226 // Called when the overall availability of media sinks has been updated. 232 // Called when the overall availability of media sinks has been updated.
227 OnSinkAvailabilityUpdated(SinkAvailability availability); 233 OnSinkAvailabilityUpdated(SinkAvailability availability);
228 234
229 // Called when the state of presentation connected to route |route_id| has 235 // Called when the state of presentation connected to route |route_id| has
230 // changed to |state|. 236 // changed to |state|.
231 OnPresentationConnectionStateChanged( 237 OnPresentationConnectionStateChanged(
232 string route_id, PresentationConnectionState state); 238 string route_id, PresentationConnectionState state);
233 }; 239 };
234 240
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698