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

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

Issue 1053653003: Gallery: Support RAW files in Gallery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the second bind. Created 5 years, 8 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 var GalleryUtil = {}; 5 var GalleryUtil = {};
6 6
7 /** 7 /**
8 * Obtains the entry set from the entries passed from onLaunched events. 8 * Obtains the entry set from the entries passed from onLaunched events.
9 * If an single entry is specified, the function returns all entries in the same 9 * If an single entry is specified, the function returns all entries in the same
10 * directory. Otherwise the function returns the passed entries. 10 * directory. Otherwise the function returns the passed entries.
(...skipping 26 matching lines...) Expand all
37 return entries.filter(function(entry) { 37 return entries.filter(function(entry) {
38 return originalEntries[0].toURL() === entry.toURL() || 38 return originalEntries[0].toURL() === entry.toURL() ||
39 entry.name[0] !== '.'; 39 entry.name[0] !== '.';
40 }); 40 });
41 }); 41 });
42 } else { 42 } else {
43 entriesPromise = Promise.resolve(originalEntries); 43 entriesPromise = Promise.resolve(originalEntries);
44 } 44 }
45 45
46 return entriesPromise.then(function(entries) { 46 return entriesPromise.then(function(entries) {
47 return entries.filter(FileType.isImage).sort(function(a, b) { 47 return entries.filter(function(entry) {
48 return FileType.isImage(entry) || FileType.isRaw(entry);
49 }).sort(function(a, b) {
48 return a.name.localeCompare(b.name); 50 return a.name.localeCompare(b.name);
49 }); 51 });
50 }); 52 });
51 }; 53 };
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/gallery_item_unittest.js ('k') | ui/file_manager/gallery/js/image_editor/image_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698