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

Unified Diff: chrome/browser/resources/file_manager/foreground/js/file_tasks.js

Issue 109973002: Migrate from URLs to Entries in the Files App's gallery. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments + rebased. Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/foreground/js/file_tasks.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
index d7603d44f0e6d390255ce69c936d9513634feeef..52225cd64f2dd3f66ae46e0c3c2df152139931f5 100644
--- a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
+++ b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js
@@ -629,9 +629,8 @@ FileTasks.prototype.openGalleryInternal_ = function(entries) {
// changes in the Gallery and popped when the Gallery is closed.
util.updateAppState();
- // TODO(mtomasz): Pass entries instead of urls.
- var onBack = function(selectedUrls) {
- fm.directoryModel_.selectUrls(selectedUrls);
+ var onBack = function(selectedEntries) {
+ fm.directoryModel_.selectEntries(selectedEntries);
fm.closeFilePopup(); // Will call Gallery.unload.
window.appState = savedAppState;
util.saveAppState();
@@ -684,11 +683,8 @@ FileTasks.prototype.openGalleryInternal_ = function(entries) {
onAppRegionChanged: onAppRegionChanged,
displayStringFunction: strf
};
- // TODO(mtomasz): Pass entries instead.
- var allUrls = util.entriesToURLs(allEntries);
- var urls = util.entriesToURLs(entries);
galleryFrame.contentWindow.Gallery.open(
- context, fm.volumeManager_, allUrls, urls);
+ context, fm.volumeManager_, allEntries, entries);
hirono 2013/12/10 03:36:53 FileManager have a public 'volumeManager' getter.
mtomasz 2013/12/10 05:07:01 Done.
}.bind(this);
galleryFrame.src = 'gallery.html';

Powered by Google App Engine
This is Rietveld 408576698