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

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

Issue 2695613002: Hide read-only volumes in "Save As" dialogs. (Closed)
Patch Set: . Created 3 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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 */ 793 */
794 function initStrings(callback) { 794 function initStrings(callback) {
795 chrome.fileManagerPrivate.getStrings(function(strings) { 795 chrome.fileManagerPrivate.getStrings(function(strings) {
796 loadTimeData.data = strings; 796 loadTimeData.data = strings;
797 i18nTemplate.process(document, loadTimeData); 797 i18nTemplate.process(document, loadTimeData);
798 callback(); 798 callback();
799 }.wrap(null)); 799 }.wrap(null));
800 } 800 }
801 801
802 function initVolumeManager(callback) { 802 function initVolumeManager(callback) {
803 var volumeManager = new VolumeManagerWrapper(AllowedPaths.ANY_PATH); 803 var volumeManager = new VolumeManagerWrapper(AllowedPaths.ANY_PATH, false);
804 volumeManager.ensureInitialized(callback); 804 volumeManager.ensureInitialized(callback);
805 } 805 }
806 806
807 var initPromise = Promise.all( 807 var initPromise = Promise.all(
808 [new Promise(initStrings.wrap(null)), 808 [new Promise(initStrings.wrap(null)),
809 new Promise(initVolumeManager.wrap(null)), 809 new Promise(initVolumeManager.wrap(null)),
810 new Promise(util.addPageLoadHandler.wrap(null))]); 810 new Promise(util.addPageLoadHandler.wrap(null))]);
811 811
812 initPromise.then(function(unused) { 812 initPromise.then(function(unused) {
813 return new Promise(function(fulfill, reject) { 813 return new Promise(function(fulfill, reject) {
814 util.URLsToEntries(window.appState.items, function(entries) { 814 util.URLsToEntries(window.appState.items, function(entries) {
815 metrics.recordOpenVideoPlayerAction(); 815 metrics.recordOpenVideoPlayerAction();
816 metrics.recordNumberOfOpenedFiles(entries.length); 816 metrics.recordNumberOfOpenedFiles(entries.length);
817 817
818 player.prepare(entries); 818 player.prepare(entries);
819 player.playFirstVideo(player, fulfill); 819 player.playFirstVideo(player, fulfill);
820 }.wrap()); 820 }.wrap());
821 }.wrap()); 821 }.wrap());
822 }.wrap()); 822 }.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