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

Unified Diff: chrome/browser/resources/media_router/media_router_data.js

Issue 2932933002: [Media Router] Increment the media's current_time in the WebUI route controller (Closed)
Patch Set: Check that we can increment in onRouteStatusChange_() Created 3 years, 6 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/resources/media_router/media_router_data.js
diff --git a/chrome/browser/resources/media_router/media_router_data.js b/chrome/browser/resources/media_router/media_router_data.js
index e5d2c8c1a143210e4d3f057b04d8563c7c07511f..743f20df42a019d588b24e2f349c19283cc035ae 100644
--- a/chrome/browser/resources/media_router/media_router_data.js
+++ b/chrome/browser/resources/media_router/media_router_data.js
@@ -85,6 +85,16 @@ media_router.MediaRouterView = {
*/
media_router.MINIMUM_SINKS_FOR_SEARCH = 20;
+/**
+ * The states that media can be in.
+ * @enum {number}
+ */
+media_router.PlayState = {
+ PLAYING: 0,
+ PAUSED: 1,
+ BUFFERING: 2,
+};
+
/**
* This corresponds to the C++ MediaSink IconType, and the order must stay in
* sync.
@@ -241,8 +251,10 @@ cr.define('media_router', function() {
* @struct
*/
var RouteStatus = function(
- title, description, canPlayPause, canMute, canSetVolume, canSeek,
- isPaused, isMuted, volume, duration, currentTime) {
+ title = '', description = '', canPlayPause = false, canMute = false,
+ canSetVolume = false, canSeek = false,
+ playState = media_router.PlayState.PLAYING, isPaused = false,
+ isMuted = false, volume = 0, duration = 0, currentTime = 0) {
/** @type {string} */
this.title = title;
@@ -262,8 +274,8 @@ cr.define('media_router', function() {
/** @type {boolean} */
this.canSeek = canSeek;
- /** @type {boolean} */
- this.isPaused = isPaused;
+ /** @type {media_router.PlayState} */
+ this.playState = playState;
/** @type {boolean} */
this.isMuted = isMuted;

Powered by Google App Engine
This is Rietveld 408576698