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

Unified Diff: chrome/browser/media/router/media_status.h

Issue 2727123002: [Media Router] Custom Controls 1 - Add MediaStatus, MediaRouteController, and mojo interfaces (Closed)
Patch Set: Address Derek's and Daniel's comments 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 side-by-side diff with in-line comments
Download patch
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..6599067c9655b1442e7a0b202a1552cf2f29726a
--- /dev/null
+++ b/chrome/browser/media/router/media_status.h
@@ -0,0 +1,64 @@
+// 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>
+
+#include "base/time/time.h"
+
+namespace media_router {
+
+// Represents the current state of a media content.
+struct MediaStatus {
+ public:
+ MediaStatus();
+ MediaStatus(const MediaStatus& other);
+ virtual ~MediaStatus();
+
+ 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".
mark a. foltz 2017/03/17 23:55:04 To me, this example reflects the application or th
takumif 2017/03/20 22:10:45 Cast MRP uses "name" and "status". Maybe status ca
mark a. foltz 2017/03/21 00:05:21 I like "description" as this seems to be describin
takumif 2017/03/22 21:54:30 Changing to "description".
+ std::string status;
+
+ // If this is true, the media can be played and paused.
+ bool can_play_pause = false;
mark a. foltz 2017/03/17 23:55:04 can_pause? Not trying to bikeshed here. But woul
takumif 2017/03/20 22:10:45 No, I don't think we'd have something that can be
mark a. foltz 2017/03/21 00:05:21 OK, never mind.
+
+ // If this is true, the media can be muted and unmuted.
+ bool can_mute = false;
+
+ // If this is true, the media's volume can be changed.
+ bool can_set_volume = false;
+
+ // If this is true, the media's current playback position can be changed.
+ bool can_seek = false;
+
+ bool is_paused = false;
+
+ bool is_muted = false;
+
+ // 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 = 0;
+
+ // The length of the media. A value of zero indicates that this is a media
+ // with no set duration (e.g. a live stream).
+ base::TimeDelta duration;
+
+ // Current playback position. Must be less than or equal to |duration|.
+ base::TimeDelta current_time;
+};
+
+} // namespace media_router
+
+#endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_STATUS_H_

Powered by Google App Engine
This is Rietveld 408576698