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

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

Issue 1701163003: Hide non-native volumes when saving files from the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 4 years, 10 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
« no previous file with comments | « ui/file_manager/gallery/js/gallery.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 /** 5 /**
6 * @param {!HTMLElement} playerContainer Main container. 6 * @param {!HTMLElement} playerContainer Main container.
7 * @param {!HTMLElement} videoContainer Container for the video element. 7 * @param {!HTMLElement} videoContainer Container for the video element.
8 * @param {!HTMLElement} controlsContainer Container for video controls. 8 * @param {!HTMLElement} controlsContainer Container for video controls.
9 * @constructor 9 * @constructor
10 * @struct 10 * @struct
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 */ 685 */
686 function initStrings(callback) { 686 function initStrings(callback) {
687 chrome.fileManagerPrivate.getStrings(function(strings) { 687 chrome.fileManagerPrivate.getStrings(function(strings) {
688 loadTimeData.data = strings; 688 loadTimeData.data = strings;
689 i18nTemplate.process(document, loadTimeData); 689 i18nTemplate.process(document, loadTimeData);
690 callback(); 690 callback();
691 }.wrap(null)); 691 }.wrap(null));
692 } 692 }
693 693
694 function initVolumeManager(callback) { 694 function initVolumeManager(callback) {
695 var volumeManager = new VolumeManagerWrapper( 695 var volumeManager = new VolumeManagerWrapper(AllowedPaths.ANY_PATH);
696 VolumeManagerWrapper.NonNativeVolumeStatus.ENABLED);
697 volumeManager.ensureInitialized(callback); 696 volumeManager.ensureInitialized(callback);
698 } 697 }
699 698
700 var initPromise = Promise.all( 699 var initPromise = Promise.all(
701 [new Promise(initStrings.wrap(null)), 700 [new Promise(initStrings.wrap(null)),
702 new Promise(initVolumeManager.wrap(null)), 701 new Promise(initVolumeManager.wrap(null)),
703 new Promise(util.addPageLoadHandler.wrap(null))]); 702 new Promise(util.addPageLoadHandler.wrap(null))]);
704 703
705 initPromise.then(function(unused) { 704 initPromise.then(function(unused) {
706 return new Promise(function(fulfill, reject) { 705 return new Promise(function(fulfill, reject) {
707 util.URLsToEntries(window.appState.items, function(entries) { 706 util.URLsToEntries(window.appState.items, function(entries) {
708 metrics.recordOpenVideoPlayerAction(); 707 metrics.recordOpenVideoPlayerAction();
709 metrics.recordNumberOfOpenedFiles(entries.length); 708 metrics.recordNumberOfOpenedFiles(entries.length);
710 709
711 player.prepare(entries); 710 player.prepare(entries);
712 player.playFirstVideo(player, fulfill); 711 player.playFirstVideo(player, fulfill);
713 }.wrap()); 712 }.wrap());
714 }.wrap()); 713 }.wrap());
715 }.wrap()); 714 }.wrap());
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698