| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 string input; | 120 string input; |
| 121 // The user's current hosted domain. | 121 // The user's current hosted domain. |
| 122 string domain; | 122 string domain; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 // Maps to a ResultCode value in route_request_result.h | 125 // Maps to a ResultCode value in route_request_result.h |
| 126 // The enum defined here is a subset of those defined in route_request_result.h. | 126 // The enum defined here is a subset of those defined in route_request_result.h. |
| 127 enum RouteRequestResultCode { | 127 enum RouteRequestResultCode { |
| 128 UNKNOWN_ERROR, | 128 UNKNOWN_ERROR, |
| 129 OK, | 129 OK, |
| 130 TIMED_OUT | 130 TIMED_OUT, |
| 131 ROUTE_NOT_FOUND |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 // Modeled after the MediaRouter interface defined in | 134 // Modeled after the MediaRouter interface defined in |
| 134 // chrome/browser/media/router/media_router.h | 135 // chrome/browser/media/router/media_router.h |
| 135 interface MediaRouteProvider { | 136 interface MediaRouteProvider { |
| 136 // Creates a media route from |media_source| to the sink given by |sink_id|. | 137 // Creates a media route from |media_source| to the sink given by |sink_id|. |
| 137 // | 138 // |
| 138 // The presentation ID of the route created will be |presentation_id|, but it | 139 // The presentation ID of the route created will be |presentation_id|, but it |
| 139 // may be overridden by a provider implementation. The presentation ID will | 140 // may be overridden by a provider implementation. The presentation ID will |
| 140 // be used by the presentation API to refer to the created route. | 141 // be used by the presentation API to refer to the created route. |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 // changed to |state|. | 382 // changed to |state|. |
| 382 OnPresentationConnectionStateChanged( | 383 OnPresentationConnectionStateChanged( |
| 383 string route_id, PresentationConnectionState state); | 384 string route_id, PresentationConnectionState state); |
| 384 | 385 |
| 385 // Called when the presentation connected to route |route_id| has closed. | 386 // Called when the presentation connected to route |route_id| has closed. |
| 386 OnPresentationConnectionClosed( | 387 OnPresentationConnectionClosed( |
| 387 string route_id, PresentationConnectionCloseReason reason, | 388 string route_id, PresentationConnectionCloseReason reason, |
| 388 string message); | 389 string message); |
| 389 }; | 390 }; |
| 390 | 391 |
| OLD | NEW |