Chromium Code Reviews| Index: chrome/browser/media/router/mojo/media_router.mojom |
| diff --git a/chrome/browser/media/router/mojo/media_router.mojom b/chrome/browser/media/router/mojo/media_router.mojom |
| index 37fc064748de40d2a68f17ebec05798d2c3a4871..ab926702828447d00b384bcd598de414772e0662 100644 |
| --- a/chrome/browser/media/router/mojo/media_router.mojom |
| +++ b/chrome/browser/media/router/mojo/media_router.mojom |
| @@ -6,6 +6,7 @@ module media_router.mojom; |
| import "mojo/common/time.mojom"; |
| import "url/mojo/origin.mojom"; |
| +import "url/mojo/url.mojom"; |
| // Represents an output sink to which media can be routed. |
| struct MediaSink { |
| @@ -27,6 +28,52 @@ struct MediaSink { |
| string? domain; |
| // The type of icon to show in the UI for this media sink. |
| IconType icon_type; |
| + // This is currently only set by MediaRouter in OnSinksDiscovered(). |
| + MediaSinkExtraData? extra_data; |
| +}; |
| + |
| +union MediaSinkExtraData { |
| + DialMediaSink dial_media_sink; |
| + CastMediaSink cast_media_sink; |
| +}; |
| + |
| +// Mirror of net::IPAddress. |
| +struct IPAddress { |
| + // IP address as a numeric value from most to least significant byte. |
| + // Will be of length 4 for IPv4 addresses and 16 for IPv6. |
| + array<uint8> address; |
| +}; |
| + |
| +struct DialMediaSink { |
| + IPAddress ip_address; |
| + |
| + // Model name of the sink, if it represents a physical device. |
| + string model_name; |
| + |
| + // Used for DIAL launch |
| + url.mojom.Url app_url; |
| +}; |
| + |
| +struct CastMediaSink { |
| + IPAddress ip_address; |
| + |
| + // Model name of the sink, if it represents a physical device. |
| + string model_name; |
| + |
| + // A bit vector representing capabilities of the sink. Meaning of capacity |
| + // value for each bit: |
| + // NONE: 0, |
| + // VIDEO_OUT: 1 << 0, |
| + // VIDEO_IN: 1 << 1, |
| + // AUDIO_OUT: 1 << 2, |
| + // AUDIO_IN: 1 << 3, |
| + // DEV_MODE: 1 << 4, |
| + // MULTIZONE_GROUP: 1 << 5 |
| + int32 capabilities; |
|
dcheng
2017/03/06 23:02:05
Nit: We usually prefer unsigned for bitmasks
zhaobin
2017/03/07 19:28:49
Done.
|
| + |
| + // ID of Cast channel opened by Media Router. The ID is defined by the |
| + // chrome.cast.channel API. |
| + int32 cast_channel_id; |
| }; |
| // Should be kept in sync with media_route.h. |