Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 // The |media_source| should be considered when returning joinable | |
| 165 // routes in the OnRoutesUpdated() call. | |
| 166 // Querying will continue until | |
| 164 // StopObservingMediaRoutes() is called. | 167 // StopObservingMediaRoutes() is called. |
|
imcheng
2015/11/26 00:49:45
nit: some of this can go in previous line?
matt.boetger
2015/12/01 01:26:56
Done.
| |
| 165 StartObservingMediaRoutes(); | 168 StartObservingMediaRoutes(string media_source); |
| 166 | 169 |
| 167 // Stops querying the state of all media routes. | 170 // Stops querying the state of all media routes in the context of |
| 168 StopObservingMediaRoutes(); | 171 // the |media_source|. |
| 172 StopObservingMediaRoutes(string media_source); | |
| 169 | 173 |
| 170 // Called when the MediaRouter is ready to get the next batch of messages | 174 // Called when the MediaRouter is ready to get the next batch of messages |
| 171 // associated with |route_id|. | 175 // associated with |route_id|. |
| 172 // |messages| returned will contain the batch of messages. | 176 // |messages| returned will contain the batch of messages. |
| 173 // |messages| will be empty if |StopListeningForRouteMessages| was invoked. | 177 // |messages| will be empty if |StopListeningForRouteMessages| was invoked. |
| 174 // |error| indicates if a permanent error occurred. If true, then subsequent | 178 // |error| indicates if a permanent error occurred. If true, then subsequent |
| 175 // calls will also return with |error| being true. | 179 // calls will also return with |error| being true. |
| 176 ListenForRouteMessages(string route_id) => | 180 ListenForRouteMessages(string route_id) => |
| 177 (array<RouteMessage> messages, bool error); | 181 (array<RouteMessage> messages, bool error); |
| 178 | 182 |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 206 // process. | 210 // process. |
| 207 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) => | 211 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) => |
| 208 (string instance_id); | 212 (string instance_id); |
| 209 | 213 |
| 210 // Called when the Media Route Manager receives a new list of sinks. | 214 // Called when the Media Route Manager receives a new list of sinks. |
| 211 OnSinksReceived(string media_source, array<MediaSink> sinks); | 215 OnSinksReceived(string media_source, array<MediaSink> sinks); |
| 212 | 216 |
| 213 // Called when issues are reported for media routes. | 217 // Called when issues are reported for media routes. |
| 214 OnIssue(Issue issue); | 218 OnIssue(Issue issue); |
| 215 | 219 |
| 216 // Called when list of routes has been updated. | 220 // Called when list of routes has been updated. |
|
imcheng
2015/11/26 00:49:45
Could you pleae update documentation?
matt.boetger
2015/12/01 01:26:55
Done.
| |
| 217 OnRoutesUpdated(array<MediaRoute> routes); | 221 OnRoutesUpdated(string media_source, array<MediaRoute> routes, |
| 222 array<string> joinableRouteIds); | |
| 218 | 223 |
| 219 // Called when the overall availability of media sinks has been updated. | 224 // Called when the overall availability of media sinks has been updated. |
| 220 OnSinkAvailabilityUpdated(SinkAvailability availability); | 225 OnSinkAvailabilityUpdated(SinkAvailability availability); |
| 221 }; | 226 }; |
| 222 | 227 |
| OLD | NEW |