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

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

Issue 2675033002: [Media Router] Add MediaSink subtypes (Closed)
Patch Set: merge with master 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..41bbede846da68241fd05e675a5fec90fe52cf0d 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 {
@@ -29,6 +30,38 @@ struct MediaSink {
IconType icon_type;
};
+// Represents a sink discovered by Media Router, which is pushed to the
+// MediaRouteProvider. It wraps a MediaSink with additional data required by the
+// MediaRouteProvider to perform additional operations, such as route creation.
+struct TypedMediaSink {
mark a. foltz 2017/02/17 02:22:31 Does this need to be distinct from MediaSink? If
imcheng 2017/02/17 19:56:16 It seems doing this will weaken the validation pro
mark a. foltz 2017/02/21 17:32:37 I see. However we could move all the additional f
zhaobin 2017/02/22 00:42:08 Done.
+ MediaSink sink;
+
+ string ip_address;
+
+ // Model name of the sink, if it represents a physical device.
+ string? model_name;
+
+ MediaSinkExtraData extra_data;
+};
+
+union MediaSinkExtraData {
+ DialMediaSink dial_media_sink;
+ CastMediaSink cast_media_sink;
+};
+
+struct DialMediaSink {
+ // Used for DIAL launch
+ url.mojom.Url app_url;
+};
+
+struct CastMediaSink {
+ int32 capabilities;
mark a. foltz 2017/02/17 02:22:31 Can this be defined further? What do the bit posi
zhaobin 2017/02/22 00:42:08 Done.
+
+ // ID of cast channel opened by Media Router. The ID can be
+ // used to send call chrome.cast.channel.send.
+ int32 cast_channel_id;
+};
+
// Should be kept in sync with media_route.h.
struct MediaRoute {
// The ID of this media route, e.g. "r_PR1O_blkC9dsKp-tb1ti8qurOo".

Powered by Google App Engine
This is Rietveld 408576698