| 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 // The sink identifier, e.g. "rs71w7mFzYLFlabir_qO4NHl6SUc." | 9 // The sink identifier, e.g. "rs71w7mFzYLFlabir_qO4NHl6SUc." |
| 10 string sink_id; | 10 string sink_id; |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 string origin, | 129 string origin, |
| 130 int32 tab_id) => (MediaRoute? route, string? error_text); | 130 int32 tab_id) => (MediaRoute? route, string? error_text); |
| 131 | 131 |
| 132 // Closes the route specified by |route_id|. | 132 // Closes the route specified by |route_id|. |
| 133 CloseRoute(string route_id); | 133 CloseRoute(string route_id); |
| 134 | 134 |
| 135 // Sends |message| via the media route |media_route_id|. | 135 // Sends |message| via the media route |media_route_id|. |
| 136 // If the operation was successful, |sent| is true; otherwise it is false. | 136 // If the operation was successful, |sent| is true; otherwise it is false. |
| 137 SendRouteMessage(string media_route_id, string message) => (bool sent); | 137 SendRouteMessage(string media_route_id, string message) => (bool sent); |
| 138 | 138 |
| 139 // Sends |data| via the media route |media_route_id|. |
| 140 // If the operation was successful, |sent| is true; otherwise it is false. |
| 141 SendRouteBinaryMessage(string media_route_id, array<uint8> data) |
| 142 => (bool sent); |
| 143 |
| 139 // Starts querying for sinks capable of displaying |media_source|. | 144 // Starts querying for sinks capable of displaying |media_source|. |
| 140 StartObservingMediaSinks(string media_source); | 145 StartObservingMediaSinks(string media_source); |
| 141 | 146 |
| 142 // Stops querying sinks for |media_source|. | 147 // Stops querying sinks for |media_source|. |
| 143 StopObservingMediaSinks(string media_source); | 148 StopObservingMediaSinks(string media_source); |
| 144 | 149 |
| 145 // Starts reporting the state of active media routes via | 150 // Starts reporting the state of active media routes via |
| 146 // OnRoutesUpdated(). Querying will continue until | 151 // OnRoutesUpdated(). Querying will continue until |
| 147 // StopObservingMediaRoutes() is called. | 152 // StopObservingMediaRoutes() is called. |
| 148 StartObservingMediaRoutes(); | 153 StartObservingMediaRoutes(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 171 // Called when the Media Route Manager receives a new list of sinks. | 176 // Called when the Media Route Manager receives a new list of sinks. |
| 172 OnSinksReceived(string media_source, array<MediaSink> sinks); | 177 OnSinksReceived(string media_source, array<MediaSink> sinks); |
| 173 | 178 |
| 174 // Called when issues are reported for media routes. | 179 // Called when issues are reported for media routes. |
| 175 OnIssue(Issue issue); | 180 OnIssue(Issue issue); |
| 176 | 181 |
| 177 // Called when list of routes has been updated. | 182 // Called when list of routes has been updated. |
| 178 OnRoutesUpdated(array<MediaRoute> routes); | 183 OnRoutesUpdated(array<MediaRoute> routes); |
| 179 }; | 184 }; |
| 180 | 185 |
| OLD | NEW |