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

Side by Side Diff: ui/file_manager/video_player/js/video_player.js

Issue 450903002: Random clean up around Chrome OS file manager code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ui/file_manager/video_player/js/error_util.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * @param {Element} playerContainer Main container. 8 * @param {Element} playerContainer Main container.
9 * @param {Element} videoContainer Container for the video element. 9 * @param {Element} videoContainer Container for the video element.
10 * @param {Element} controlsContainer Container for video controls. 10 * @param {Element} controlsContainer Container for video controls.
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 489
490 /** 490 /**
491 * Set the list of casts. 491 * Set the list of casts.
492 * @param {Array.<Object>} casts List of casts. 492 * @param {Array.<Object>} casts List of casts.
493 */ 493 */
494 VideoPlayer.prototype.setCastList = function(casts) { 494 VideoPlayer.prototype.setCastList = function(casts) {
495 var button = document.querySelector('.cast-button'); 495 var button = document.querySelector('.cast-button');
496 var menu = document.querySelector('#cast-menu'); 496 var menu = document.querySelector('#cast-menu');
497 menu.innerHTML = ''; 497 menu.innerHTML = '';
498 498
499 // TODO(yoshiki): Handle the case that the current cast disapears. 499 // TODO(yoshiki): Handle the case that the current cast disappears.
500 500
501 if (casts.length === 0) { 501 if (casts.length === 0) {
502 button.classList.add('hidden'); 502 button.classList.add('hidden');
503 if (this.currentCast_) 503 if (this.currentCast_)
504 this.onCurrentCastDisappear_(); 504 this.onCurrentCastDisappear_();
505 return; 505 return;
506 } 506 }
507 507
508 if (this.currentCast_) { 508 if (this.currentCast_) {
509 var currentCastAvailable = casts.some(function(cast) { 509 var currentCastAvailable = casts.some(function(cast) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 var initPromise = Promise.all( 577 var initPromise = Promise.all(
578 [new Promise(initVideos.wrap(null)), 578 [new Promise(initVideos.wrap(null)),
579 new Promise(initStrings.wrap(null)), 579 new Promise(initStrings.wrap(null)),
580 new Promise(util.addPageLoadHandler.wrap(null))]); 580 new Promise(util.addPageLoadHandler.wrap(null))]);
581 581
582 initPromise.then(function(results) { 582 initPromise.then(function(results) {
583 var videos = results[0]; 583 var videos = results[0];
584 player.prepare(videos); 584 player.prepare(videos);
585 return new Promise(player.playFirstVideo.wrap(player)); 585 return new Promise(player.playFirstVideo.wrap(player));
586 }.wrap(null)); 586 }.wrap(null));
OLDNEW
« no previous file with comments | « ui/file_manager/video_player/js/error_util.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698