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

Side by Side 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: . 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Any strings used here will already be localized. Values such as 5 // Any strings used here will already be localized. Values such as
6 // CastMode.type or IDs will be defined elsewhere and determined later. 6 // CastMode.type or IDs will be defined elsewhere and determined later.
7 7
8 cr.exportPath('media_router'); 8 cr.exportPath('media_router');
9 9
10 /** 10 /**
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 /** 80 /**
81 * The minimum number of sinks to have to enable the search input strictly for 81 * The minimum number of sinks to have to enable the search input strictly for
82 * filtering (i.e. the Media Router doesn't support search so the search input 82 * filtering (i.e. the Media Router doesn't support search so the search input
83 * only filters existing sinks). 83 * only filters existing sinks).
84 * @const {number} 84 * @const {number}
85 */ 85 */
86 media_router.MINIMUM_SINKS_FOR_SEARCH = 20; 86 media_router.MINIMUM_SINKS_FOR_SEARCH = 20;
87 87
88 /** 88 /**
89 * The states that media can be in.
90 * @enum {number}
91 */
92 media_router.PlayState = {
93 PLAYING: 0,
94 PAUSED: 1,
95 BUFFERING: 2,
96 };
97
98 /**
89 * This corresponds to the C++ MediaSink IconType, and the order must stay in 99 * This corresponds to the C++ MediaSink IconType, and the order must stay in
90 * sync. 100 * sync.
91 * @enum {number} 101 * @enum {number}
92 */ 102 */
93 media_router.SinkIconType = { 103 media_router.SinkIconType = {
94 CAST: 0, 104 CAST: 0,
95 CAST_AUDIO_GROUP: 1, 105 CAST_AUDIO_GROUP: 1,
96 CAST_AUDIO: 2, 106 CAST_AUDIO: 2,
97 MEETING: 3, 107 MEETING: 3,
98 HANGOUT: 4, 108 HANGOUT: 4,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 * @param {boolean} isMuted Whether the route is muted. 245 * @param {boolean} isMuted Whether the route is muted.
236 * @param {number} volume The route's volume, between 0 and 1. 246 * @param {number} volume The route's volume, between 0 and 1.
237 * @param {number} duration The route's duration in seconds. 247 * @param {number} duration The route's duration in seconds.
238 * @param {number} currentTime The route's current position in seconds. 248 * @param {number} currentTime The route's current position in seconds.
239 * Must not be greater than |duration|. 249 * Must not be greater than |duration|.
240 * @constructor 250 * @constructor
241 * @struct 251 * @struct
242 */ 252 */
243 var RouteStatus = function( 253 var RouteStatus = function(
244 title, description, canPlayPause, canMute, canSetVolume, canSeek, 254 title, description, canPlayPause, canMute, canSetVolume, canSeek,
245 isPaused, isMuted, volume, duration, currentTime) { 255 playState, isPaused, isMuted, volume, duration, currentTime) {
246 256
247 /** @type {string} */ 257 /** @type {string} */
248 this.title = title; 258 this.title = title;
249 259
250 /** @type {string} */ 260 /** @type {string} */
251 this.description = description; 261 this.description = description;
252 262
253 /** @type {boolean} */ 263 /** @type {boolean} */
254 this.canPlayPause = canPlayPause; 264 this.canPlayPause = canPlayPause;
255 265
256 /** @type {boolean} */ 266 /** @type {boolean} */
257 this.canMute = canMute; 267 this.canMute = canMute;
258 268
259 /** @type {boolean} */ 269 /** @type {boolean} */
260 this.canSetVolume = canSetVolume; 270 this.canSetVolume = canSetVolume;
261 271
262 /** @type {boolean} */ 272 /** @type {boolean} */
263 this.canSeek = canSeek; 273 this.canSeek = canSeek;
264 274
265 /** @type {boolean} */ 275 /** @type {!media_router.PlayState} */
imcheng 2017/06/20 23:00:00 ! not needed
takumif 2017/06/20 23:56:31 Done.
266 this.isPaused = isPaused; 276 this.playState = playState;
267 277
268 /** @type {boolean} */ 278 /** @type {boolean} */
269 this.isMuted = isMuted; 279 this.isMuted = isMuted;
270 280
271 /** @type {number} */ 281 /** @type {number} */
272 this.volume = volume; 282 this.volume = volume;
273 283
274 /** @type {number} */ 284 /** @type {number} */
275 this.duration = duration; 285 this.duration = duration;
276 286
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 return { 345 return {
336 AUTO_CAST_MODE: AUTO_CAST_MODE, 346 AUTO_CAST_MODE: AUTO_CAST_MODE,
337 CastMode: CastMode, 347 CastMode: CastMode,
338 Issue: Issue, 348 Issue: Issue,
339 Route: Route, 349 Route: Route,
340 RouteStatus: RouteStatus, 350 RouteStatus: RouteStatus,
341 Sink: Sink, 351 Sink: Sink,
342 TabInfo: TabInfo, 352 TabInfo: TabInfo,
343 }; 353 };
344 }); 354 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698