| OLD | NEW |
| (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 #include "base/time/time.h" | |
| 11 | |
| 12 namespace media_router { | |
| 13 | |
| 14 // Represents the current state of a media content. | |
| 15 struct MediaStatus { | |
| 16 public: | |
| 17 MediaStatus(); | |
| 18 MediaStatus(const MediaStatus& other); | |
| 19 ~MediaStatus(); | |
| 20 | |
| 21 MediaStatus& operator=(const MediaStatus& other); | |
| 22 bool operator==(const MediaStatus& other) const; | |
| 23 | |
| 24 // The main title of the media. For example, in a MediaStatus representing | |
| 25 // a YouTube Cast session, this could be the title of the video. | |
| 26 std::string title; | |
| 27 | |
| 28 // Text describing the media, or a secondary title. For example, in a | |
| 29 // MediaStatus representing a YouTube Cast session, this could be "YouTube". | |
| 30 std::string description; | |
| 31 | |
| 32 // If this is true, the media can be played and paused. | |
| 33 bool can_play_pause = false; | |
| 34 | |
| 35 // If this is true, the media can be muted and unmuted. | |
| 36 bool can_mute = false; | |
| 37 | |
| 38 // If this is true, the media's volume can be changed. | |
| 39 bool can_set_volume = false; | |
| 40 | |
| 41 // If this is true, the media's current playback position can be changed. | |
| 42 bool can_seek = false; | |
| 43 | |
| 44 bool is_paused = false; | |
| 45 | |
| 46 bool is_muted = false; | |
| 47 | |
| 48 // Current volume of the media, with 1 being the highest and 0 being the | |
| 49 // lowest/no sound. When |is_muted| is true, there should be no sound | |
| 50 // regardless of |volume|. | |
| 51 float volume = 0; | |
| 52 | |
| 53 // The length of the media. A value of zero indicates that this is a media | |
| 54 // with no set duration (e.g. a live stream). | |
| 55 base::TimeDelta duration; | |
| 56 | |
| 57 // Current playback position. Must be less than or equal to |duration|. | |
| 58 base::TimeDelta current_time; | |
| 59 }; | |
| 60 | |
| 61 } // namespace media_router | |
| 62 | |
| 63 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_STATUS_H_ | |
| OLD | NEW |