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

Side by Side Diff: chrome/browser/media/router/mojo/media_status.mojom

Issue 2727123002: [Media Router] Custom Controls 1 - Add MediaStatus, MediaRouteController, and mojo interfaces (Closed)
Patch Set: Change comment 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module media_router.mojom;
6
7 import "mojo/common/time.mojom";
8
9 // Represents the current state of a media content. This struct should be kept
10 // free of details specific to Media Router, so that it can be moved to the
11 // media namespace and be reused for other features in the future.
12 struct MediaStatus {
13 // The main title of the media. For example, in a MediaStatus representing
14 // a YouTube Cast session, this could be the title of the video.
15 string title;
16
17 // Text describing the media, or a secondary title. For example, in a
18 // MediaStatus representing a YouTube Cast session, this could be "YouTube".
19 string description;
20
21 // If this is true, the media can be played and paused through its
22 // MediaController.
23 bool can_play_pause;
24
25 // If this is true, the media can be muted and unmuted through its
26 // MediaController.
27 bool can_mute;
28
29 // If this is true, the media's volume can be changed through its
30 // MediaController.
31 bool can_set_volume;
32
33 // If this is true, the media's current playback position can be changed
34 // through its MediaController.
35 bool can_seek;
36
37 bool is_paused;
38
39 bool is_muted;
40
41 // Current volume of the media, with 1 being the highest and 0 being the
42 // lowest/no sound. When |is_muted| is true, there should be no sound
43 // regardless of |volume|.
44 float volume;
45
46 // The length of the media. A value of 0 indicates that this is a media with
47 // no set duration (e.g. a live stream).
48 mojo.common.mojom.TimeDelta duration;
49
50 // Current playback position. Must be less than or equal to |duration|.
51 mojo.common.mojom.TimeDelta current_time;
52 };
53
54 // Interface for being notified whenever the MediaStatus of a media changes.
55 // This interface should be kept free of details specific to Media Router, so
56 // that it can be moved to the media namespace and be reused for other features
57 // in the future.
58 interface MediaStatusObserver {
59 OnMediaStatusUpdated(MediaStatus status);
60 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698