Chromium Code Reviews| Index: chrome/browser/media/router/media_status.h |
| diff --git a/chrome/browser/media/router/media_status.h b/chrome/browser/media/router/media_status.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..627dda6caef89e3f3547a97faaeecbb4812bf2ef |
| --- /dev/null |
| +++ b/chrome/browser/media/router/media_status.h |
| @@ -0,0 +1,63 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_STATUS_H_ |
| +#define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_STATUS_H_ |
| + |
| +#include <string> |
| + |
| +namespace media_router { |
| + |
| +// Represents the current state of a media content. |
| +struct MediaStatus { |
| + public: |
| + MediaStatus(); |
| + MediaStatus(const MediaStatus& other); |
| + 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.
|
| + |
| + MediaStatus& operator=(const MediaStatus& other); |
| + bool operator==(const MediaStatus& other) const; |
| + |
| + // The main title of the media. For example, in a MediaStatus representing |
| + // a YouTube Cast session, this could be the title of the video. |
| + std::string title; |
| + |
| + // Text describing the status of the media, or a secondary title. For example, |
| + // in a MediaStatus representing a YouTube Cast session, this could be |
| + // "YouTube". |
| + std::string status; |
| + |
| + // If this is true, the media can be played and paused. |
| + bool can_play_pause; |
| + |
| + // If this is true, the media can be muted and unmuted. |
| + bool can_mute; |
| + |
| + // If this is true, the media's volume can be changed. |
| + bool can_set_volume; |
| + |
| + // If this is true, the media's current playback position can be changed. |
| + bool can_seek; |
| + |
| + bool is_paused; |
| + |
| + bool is_muted; |
| + |
| + // Current volume of the media, with 1 being the highest and 0 being the |
| + // lowest/no sound. When |is_muted| is true, there should be no sound |
| + // regardless of |volume|. |
| + float volume; |
| + |
| + // The length of the media in milliseconds. A value of 0 indicates that this |
| + // is a media with no set duration (e.g. a live stream). |
| + uint32_t duration; |
|
dcheng
2017/03/08 01:08:19
base::TimeDelta?
takumif
2017/03/08 04:24:02
Done.
|
| + |
| + // Current playback position in milliseconds. Must be less than or equal to |
| + // |duration|. |
| + uint32_t current_time; |
| +}; |
| + |
| +} // namespace media_router |
| + |
| +#endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_STATUS_H_ |