| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 // media sources. | 199 // media sources. |
| 200 // AVAILABLE - A sink is available regardless of source. | 200 // AVAILABLE - A sink is available regardless of source. |
| 201 enum SinkAvailability { | 201 enum SinkAvailability { |
| 202 UNAVAILABLE, | 202 UNAVAILABLE, |
| 203 PER_SOURCE, | 203 PER_SOURCE, |
| 204 AVAILABLE | 204 AVAILABLE |
| 205 }; | 205 }; |
| 206 | 206 |
| 207 // Keep in sync with content/public/browser/presentation_session.h. | 207 // Keep in sync with content/public/browser/presentation_session.h. |
| 208 enum PresentationConnectionState { | 208 enum PresentationConnectionState { |
| 209 CONNECTING, |
| 209 CONNECTED, | 210 CONNECTED, |
| 210 CLOSED, | 211 CLOSED, |
| 211 TERMINATED | 212 TERMINATED |
| 212 }; | 213 }; |
| 213 | 214 |
| 214 // Registers a MediaRouteProvider with the MediaRouter. | 215 // Registers a MediaRouteProvider with the MediaRouter. |
| 215 // Returns a string that uniquely identifies the Media Router browser | 216 // Returns a string that uniquely identifies the Media Router browser |
| 216 // process. | 217 // process. |
| 217 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) => | 218 RegisterMediaRouteProvider(MediaRouteProvider media_router_provider) => |
| 218 (string instance_id); | 219 (string instance_id); |
| 219 | 220 |
| 220 // Called when the Media Route Manager receives a new list of sinks. | 221 // Called when the Media Route Manager receives a new list of sinks. |
| 221 OnSinksReceived(string media_source, array<MediaSink> sinks); | 222 OnSinksReceived(string media_source, array<MediaSink> sinks); |
| 222 | 223 |
| 223 // Called when issues are reported for media routes. | 224 // Called when issues are reported for media routes. |
| 224 OnIssue(Issue issue); | 225 OnIssue(Issue issue); |
| 225 | 226 |
| 226 // Called when list of routes has been updated. | 227 // Called when list of routes has been updated. |
| 227 OnRoutesUpdated(array<MediaRoute> routes); | 228 OnRoutesUpdated(array<MediaRoute> routes); |
| 228 | 229 |
| 229 // Called when the overall availability of media sinks has been updated. | 230 // Called when the overall availability of media sinks has been updated. |
| 230 OnSinkAvailabilityUpdated(SinkAvailability availability); | 231 OnSinkAvailabilityUpdated(SinkAvailability availability); |
| 231 | 232 |
| 232 // Called when the state of presentation connected to route |route_id| has | 233 // Called when the state of presentation connected to route |route_id| has |
| 233 // changed to |state|. | 234 // changed to |state|. |
| 234 OnPresentationConnectionStateChanged( | 235 OnPresentationConnectionStateChanged( |
| 235 string route_id, PresentationConnectionState state); | 236 string route_id, PresentationConnectionState state); |
| 236 }; | 237 }; |
| 237 | 238 |
| OLD | NEW |