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

Side by Side Diff: chrome/browser/resources/file_manager/js/file_selection.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 /** 5 /**
6 * The current selection object. 6 * The current selection object.
7 * 7 *
8 * @param {FileManager} fileManager FileManager instance. 8 * @param {FileManager} fileManager FileManager instance.
9 * @param {Array.<number>} indexes Selected indexes. 9 * @param {Array.<number>} indexes Selected indexes.
10 * @constructor 10 * @constructor
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 * @param {Function} callback Callend when image loaded. 590 * @param {Function} callback Callend when image loaded.
591 * @return {HTMLDivElement} Created element. 591 * @return {HTMLDivElement} Created element.
592 * @private 592 * @private
593 */ 593 */
594 FileSelectionHandler.prototype.renderThumbnail_ = function(entry, callback) { 594 FileSelectionHandler.prototype.renderThumbnail_ = function(entry, callback) {
595 var thumbnail = this.fileManager_.document_.createElement('div'); 595 var thumbnail = this.fileManager_.document_.createElement('div');
596 FileGrid.decorateThumbnailBox(thumbnail, 596 FileGrid.decorateThumbnailBox(thumbnail,
597 entry, 597 entry,
598 this.fileManager_.metadataCache_, 598 this.fileManager_.metadataCache_,
599 ThumbnailLoader.FillMode.FILL, 599 ThumbnailLoader.FillMode.FILL,
600 ThumbnailLoader.OptimizationMode.NEVER_DISCARD,
600 callback); 601 callback);
601 return thumbnail; 602 return thumbnail;
602 }; 603 };
603 604
604 /** 605 /**
605 * Updates the search breadcrumbs. 606 * Updates the search breadcrumbs.
606 * 607 *
607 * @private 608 * @private
608 */ 609 */
609 FileSelectionHandler.prototype.updateSearchBreadcrumbs_ = function() { 610 FileSelectionHandler.prototype.updateSearchBreadcrumbs_ = function() {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 style.left = (boxWidth - imageWidth) / 2 + 'px'; 688 style.left = (boxWidth - imageWidth) / 2 + 'px';
688 style.top = (boxHeight - imageHeight) / 2 + 'px'; 689 style.top = (boxHeight - imageHeight) / 2 + 'px';
689 style.position = 'relative'; 690 style.position = 'relative';
690 691
691 util.applyTransform(largeImage, transform); 692 util.applyTransform(largeImage, transform);
692 693
693 largeImageBox.appendChild(largeImage); 694 largeImageBox.appendChild(largeImage);
694 largeImageBox.style.zIndex = 1000; 695 largeImageBox.style.zIndex = 1000;
695 return true; 696 return true;
696 }; 697 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698