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

Side by Side Diff: chrome/browser/media/router/media_status.h

Issue 2727123002: [Media Router] Custom Controls 1 - Add MediaStatus, MediaRouteController, and mojo interfaces (Closed)
Patch Set: . 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 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_STATUS_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_STATUS_H_
7
8 #include <string>
9
10 namespace media_router {
11
12 // Represents the current state of a media content.
13 struct MediaStatus {
14 public:
15 MediaStatus();
16 MediaStatus(const MediaStatus& other);
17 virtual ~MediaStatus();
dcheng 2017/03/08 01:08:19 No virtual.
takumif 2017/03/08 04:24:02 Sorry for my lack of C++ knowledge, but would you
mark a. foltz 2017/03/13 18:22:31 - By declaring this a struct you're saying it's no
dcheng 2017/03/17 06:15:14 +1, it doesn't seem like it's subclassed at the mo
takumif 2017/03/20 22:10:45 Got it, removing.
18
19 MediaStatus& operator=(const MediaStatus& other);
20 bool operator==(const MediaStatus& other) const;
21
22 // The main title of the media. For example, in a MediaStatus representing
23 // a YouTube Cast session, this could be the title of the video.
24 std::string title;
25
26 // Text describing the status of the media, or a secondary title. For example,
27 // in a MediaStatus representing a YouTube Cast session, this could be
28 // "YouTube".
29 std::string status;
30
31 // If this is true, the media can be played and paused.
32 bool can_play_pause;
33
34 // If this is true, the media can be muted and unmuted.
35 bool can_mute;
36
37 // If this is true, the media's volume can be changed.
38 bool can_set_volume;
39
40 // If this is true, the media's current playback position can be changed.
41 bool can_seek;
42
43 bool is_paused;
44
45 bool is_muted;
46
47 // Current volume of the media, with 1 being the highest and 0 being the
48 // lowest/no sound. When |is_muted| is true, there should be no sound
49 // regardless of |volume|.
50 float volume;
51
52 // The length of the media in milliseconds. A value of 0 indicates that this
53 // is a media with no set duration (e.g. a live stream).
54 uint32_t duration;
dcheng 2017/03/08 01:08:19 base::TimeDelta?
takumif 2017/03/08 04:24:02 Done.
55
56 // Current playback position in milliseconds. Must be less than or equal to
57 // |duration|.
58 uint32_t current_time;
59 };
60
61 } // namespace media_router
62
63 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_STATUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698