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

Side by Side Diff: chrome/browser/resources/file_manager/js/action_choice.js

Issue 12304013: Introduce Image loader extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplified. Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 document.addEventListener('DOMContentLoaded', function() { 5 document.addEventListener('DOMContentLoaded', function() {
6 ActionChoice.load(); 6 ActionChoice.load();
7 }); 7 });
8 8
9 /** 9 /**
10 * The main ActionChoice object. 10 * The main ActionChoice object.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } else { 213 } else {
214 this.renderPreview_(entries, count); 214 this.renderPreview_(entries, count);
215 } 215 }
216 }.bind(this); 216 }.bind(this);
217 217
218 this.metadataCache_.get(entry, 'thumbnail|filesystem', 218 this.metadataCache_.get(entry, 'thumbnail|filesystem',
219 function(metadata) { 219 function(metadata) {
220 new ThumbnailLoader(entry.toURL(), 220 new ThumbnailLoader(entry.toURL(),
221 ThumbnailLoader.LoaderType.IMAGE, 221 ThumbnailLoader.LoaderType.IMAGE,
222 metadata).load( 222 metadata).load(
223 box, ThumbnailLoader.FillMode.FILL, onSuccess, onError, onError); 223 box,
224 ThumbnailLoader.OptimizationMode.DISCARD_DETACHED,
225 ThumbnailLoader.FillMode.FILL,
226 onSuccess,
227 onError,
228 onError);
224 }); 229 });
225 }; 230 };
226 231
227 /** 232 /**
228 * Closes the window. 233 * Closes the window.
229 * @private 234 * @private
230 */ 235 */
231 ActionChoice.prototype.close_ = function() { 236 ActionChoice.prototype.close_ = function() {
232 window.close(); 237 window.close();
233 }; 238 };
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 */ 319 */
315 ActionChoice.prototype.recordAction_ = function(action) { 320 ActionChoice.prototype.recordAction_ = function(action) {
316 metrics.recordEnum('PhotoImport.Action', action, 321 metrics.recordEnum('PhotoImport.Action', action,
317 ['import-photos-to-drive', 322 ['import-photos-to-drive',
318 'view-files', 323 'view-files',
319 'view-files-auto', 324 'view-files-auto',
320 'watch-single-video', 325 'watch-single-video',
321 'error', 326 'error',
322 'close']); 327 'close']);
323 }; 328 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/gallery.html ('k') | chrome/browser/resources/file_manager/js/file_selection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698