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.mojom; | 5 module media_router.mojom; |
| 6 | 6 |
| 7 import "mojo/common/time.mojom"; | 7 import "mojo/common/time.mojom"; |
| 8 import "url/mojo/url.mojom"; | |
| 8 | 9 |
| 9 // Represents an output sink to which media can be routed. | 10 // Represents an output sink to which media can be routed. |
| 10 struct MediaSink { | 11 struct MediaSink { |
| 11 enum IconType { | 12 enum IconType { |
| 12 CAST, | 13 CAST, |
| 13 CAST_AUDIO, | 14 CAST_AUDIO, |
| 14 CAST_AUDIO_GROUP, | 15 CAST_AUDIO_GROUP, |
| 15 GENERIC, | 16 GENERIC, |
| 16 HANGOUT | 17 HANGOUT |
| 17 }; | 18 }; |
| 18 | 19 |
| 19 // The sink identifier, e.g. "rs71w7mFzYLFlabir_qO4NHl6SUc." | 20 // The sink identifier, e.g. "rs71w7mFzYLFlabir_qO4NHl6SUc." |
| 20 string sink_id; | 21 string sink_id; |
| 21 // The human-readable name, e.g. "Janet's Chromecast". | 22 // The human-readable name, e.g. "Janet's Chromecast". |
| 22 string name; | 23 string name; |
| 23 // Optional description of the sink. | 24 // Optional description of the sink. |
| 24 string? description; | 25 string? description; |
| 25 // Optional domain of the sink if this sink is associated with an identity. | 26 // Optional domain of the sink if this sink is associated with an identity. |
| 26 string? domain; | 27 string? domain; |
| 27 // The type of icon to show in the UI for this media sink. | 28 // The type of icon to show in the UI for this media sink. |
| 28 IconType icon_type; | 29 IconType icon_type; |
| 30 | |
| 31 // Used for feedback | |
|
imcheng
2017/02/08 01:28:09
Replace the "Used for XXX" with a description of w
zhaobin
2017/02/09 00:13:52
Done.
| |
| 32 string? model_name; | |
| 33 | |
| 34 MediaSinkExtraData? extra_data; | |
| 35 }; | |
| 36 | |
| 37 union MediaSinkExtraData { | |
| 38 DialMediaSink dial_media_sink; | |
| 39 CastMediaSink cast_media_sink; | |
| 40 }; | |
| 41 | |
| 42 struct DialMediaSink { | |
| 43 // Used for feedback | |
| 44 string ip_address; | |
| 45 | |
| 46 // Used for DIAL launch | |
| 47 url.mojom.Url app_url; | |
| 48 }; | |
| 49 | |
| 50 struct CastMediaSink { | |
| 51 int32 capabilities; | |
| 52 | |
| 53 // Used for feedback | |
| 54 string ip_address; | |
| 55 | |
| 56 // ID of cast channel opened by Media Router. The ID can be | |
| 57 // used to send call chrome.cast.channel.send. | |
| 58 int32 cast_channel_id; | |
| 29 }; | 59 }; |
| 30 | 60 |
| 31 // Should be kept in sync with media_route.h. | 61 // Should be kept in sync with media_route.h. |
| 32 struct MediaRoute { | 62 struct MediaRoute { |
| 33 // The ID of this media route, e.g. "r_PR1O_blkC9dsKp-tb1ti8qurOo". | 63 // The ID of this media route, e.g. "r_PR1O_blkC9dsKp-tb1ti8qurOo". |
| 34 string media_route_id; | 64 string media_route_id; |
| 35 // The ID of the media source being sent through this media route. | 65 // The ID of the media source being sent through this media route. |
| 36 // May be missing if route is not local. | 66 // May be missing if route is not local. |
| 37 string? media_source; | 67 string? media_source; |
| 38 // The ID of sink that is rendering the media content. | 68 // The ID of sink that is rendering the media content. |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 389 | 419 |
| 390 // Called when the a batch of messages arrives from the media sink for the | 420 // Called when the a batch of messages arrives from the media sink for the |
| 391 // route given by |route_id|. | 421 // route given by |route_id|. |
| 392 // |StartListeningForRouteMessages| must be called first in order to receive | 422 // |StartListeningForRouteMessages| must be called first in order to receive |
| 393 // messages. | 423 // messages. |
| 394 // |route_id|: ID of route of the messages. | 424 // |route_id|: ID of route of the messages. |
| 395 // |messages|: A non-empty list of messages received. | 425 // |messages|: A non-empty list of messages received. |
| 396 OnRouteMessagesReceived(string route_id, | 426 OnRouteMessagesReceived(string route_id, |
| 397 array<RouteMessage> messages); | 427 array<RouteMessage> messages); |
| 398 }; | 428 }; |
| OLD | NEW |