Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: chrome/browser/media/router/mojo/media_router.mojom

Issue 2675033002: [Media Router] Add MediaSink subtypes (Closed)
Patch Set: resolve code review comments from Derek Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..808999261581905bae91ffa67e1764a5847b2c7d 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,45 @@ 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;
+};
+
+struct DialMediaSink {
+ string ip_address;
dcheng 2017/03/03 10:37:10 Can we add a typemap for net::IPAddress? We alread
zhaobin 2017/03/03 23:56:42 Do it in a seperate patch? Created crbug.com/69842
dcheng 2017/03/04 01:49:16 The reason I mention is because mojo struct trait
zhaobin 2017/03/06 18:31:26 Added IPAddress here. host_resolver_service.mojom
dcheng 2017/03/06 23:02:05 How about just creating a new mojom for the struct
zhaobin 2017/03/07 19:28:49 Is it ok to leave struct IPAddress in media_router
dcheng 2017/03/07 19:54:32 (Sorry just saw this comment) Hmm... it's not gre
+
+ // 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 {
+ string 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;
+
+ // 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.

Powered by Google App Engine
This is Rietveld 408576698