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

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

Issue 282523002: Use resolveIsolatedEntries in the separated new Gallery.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 7 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/gallery/js/background.js ('k') | ui/file_manager/gallery/manifest.json » ('j') | 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 * Called from the main frame when unloading. 8 * Called from the main frame when unloading.
9 * @param {boolean=} opt_exiting True if the app is exiting. 9 * @param {boolean=} opt_exiting True if the app is exiting.
10 */ 10 */
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 Gallery.prototype.updateButtons_ = function() { 880 Gallery.prototype.updateButtons_ = function() {
881 if (this.modeButton_) { 881 if (this.modeButton_) {
882 var oppositeMode = 882 var oppositeMode =
883 this.currentMode_ === this.slideMode_ ? this.mosaicMode_ : 883 this.currentMode_ === this.slideMode_ ? this.mosaicMode_ :
884 this.slideMode_; 884 this.slideMode_;
885 this.modeButton_.title = str(oppositeMode.getTitle()); 885 this.modeButton_.title = str(oppositeMode.getTitle());
886 } 886 }
887 }; 887 };
888 888
889 window.addEventListener('load', function() { 889 window.addEventListener('load', function() {
890 var entries = window.launchData.items.map( 890 Promise.all([
891 function(item) { return item.entry; }); 891 window.backgroundComponentsPromise,
892 window.backgroundComponent. 892 window.launchData.entriesPromise
893 then(function(inBackgroundComponent) { 893 ]).then(function(args) {
894 window.loadTimeData.data = inBackgroundComponent.stringData; 894 var backgroundComponents = args[0];
895 var gallery = new Gallery(inBackgroundComponent.volumeManager); 895 var entries = args[1];
896 gallery.load(entries, entries); 896 window.loadTimeData.data = backgroundComponents.stringData;
897 }). 897 var gallery = new Gallery(backgroundComponents.volumeManager);
898 catch(function(error) { 898 gallery.load(entries.allEntries, entries.selectedEntries);
899 console.error(error.stack || error); 899 }).catch(function(error) {
900 }); 900 console.error(error.stack || error);
901 });
901 }); 902 });
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/background.js ('k') | ui/file_manager/gallery/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698