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

Side by Side 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 and Mark Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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 "net/interfaces/ip_address.mojom";
8 import "url/mojo/origin.mojom"; 9 import "url/mojo/origin.mojom";
10 import "url/mojo/url.mojom";
9 11
10 // Represents an output sink to which media can be routed. 12 // Represents an output sink to which media can be routed.
11 struct MediaSink { 13 struct MediaSink {
12 enum IconType { 14 enum IconType {
13 CAST, 15 CAST,
14 CAST_AUDIO, 16 CAST_AUDIO,
15 CAST_AUDIO_GROUP, 17 CAST_AUDIO_GROUP,
16 GENERIC, 18 GENERIC,
17 HANGOUT 19 HANGOUT
18 }; 20 };
19 21
20 // The sink identifier, e.g. "rs71w7mFzYLFlabir_qO4NHl6SUc." 22 // The sink identifier, e.g. "rs71w7mFzYLFlabir_qO4NHl6SUc."
21 string sink_id; 23 string sink_id;
22 // The human-readable name, e.g. "Janet's Chromecast". 24 // The human-readable name, e.g. "Janet's Chromecast".
23 string name; 25 string name;
24 // Optional description of the sink. 26 // Optional description of the sink.
25 string? description; 27 string? description;
26 // Optional domain of the sink if this sink is associated with an identity. 28 // Optional domain of the sink if this sink is associated with an identity.
27 string? domain; 29 string? domain;
28 // The type of icon to show in the UI for this media sink. 30 // The type of icon to show in the UI for this media sink.
29 IconType icon_type; 31 IconType icon_type;
32 // This is currently only set by MediaRouter in OnSinksDiscovered().
33 MediaSinkExtraData? extra_data;
34 };
35
36 union MediaSinkExtraData {
37 DialMediaSink dial_media_sink;
38 CastMediaSink cast_media_sink;
39 };
40
41 struct DialMediaSink {
42 net.interfaces.IPAddress ip_address;
43
44 // Model name of the sink, if it represents a physical device.
45 string model_name;
46
47 // Used for DIAL launch
48 url.mojom.Url app_url;
49 };
50
51 struct CastMediaSink {
52 net.interfaces.IPAddress ip_address;
53
54 // Model name of the sink, if it represents a physical device.
55 string model_name;
56
57 // A bit vector representing capabilities of the sink. Meaning of capacity
58 // value for each bit:
59 // NONE: 0,
60 // VIDEO_OUT: 1 << 0,
61 // VIDEO_IN: 1 << 1,
62 // AUDIO_OUT: 1 << 2,
63 // AUDIO_IN: 1 << 3,
64 // DEV_MODE: 1 << 4,
65 // MULTIZONE_GROUP: 1 << 5
66 uint8 capabilities;
67
68 // ID of Cast channel opened by Media Router. The ID is defined by the
69 // chrome.cast.channel API.
70 int32 cast_channel_id;
30 }; 71 };
31 72
32 // Should be kept in sync with media_route.h. 73 // Should be kept in sync with media_route.h.
33 struct MediaRoute { 74 struct MediaRoute {
34 // The ID of this media route, e.g. "r_PR1O_blkC9dsKp-tb1ti8qurOo". 75 // The ID of this media route, e.g. "r_PR1O_blkC9dsKp-tb1ti8qurOo".
35 string media_route_id; 76 string media_route_id;
36 // The ID of the media source being sent through this media route. 77 // The ID of the media source being sent through this media route.
37 // May be missing if route is not local. 78 // May be missing if route is not local.
38 string? media_source; 79 string? media_source;
39 // The ID of sink that is rendering the media content. 80 // The ID of sink that is rendering the media content.
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 431
391 // Called when the a batch of messages arrives from the media sink for the 432 // Called when the a batch of messages arrives from the media sink for the
392 // route given by |route_id|. 433 // route given by |route_id|.
393 // |StartListeningForRouteMessages| must be called first in order to receive 434 // |StartListeningForRouteMessages| must be called first in order to receive
394 // messages. 435 // messages.
395 // |route_id|: ID of route of the messages. 436 // |route_id|: ID of route of the messages.
396 // |messages|: A non-empty list of messages received. 437 // |messages|: A non-empty list of messages received.
397 OnRouteMessagesReceived(string route_id, 438 OnRouteMessagesReceived(string route_id,
398 array<RouteMessage> messages); 439 array<RouteMessage> messages);
399 }; 440 };
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_sink.cc ('k') | chrome/browser/media/router/mojo/media_router.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698