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

Unified Diff: ui/file_manager/gallery/js/mosaic_mode.js

Issue 976713004: Add thumbnailMetadataItem to GalleryItem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/gallery/js/mosaic_mode.js
diff --git a/ui/file_manager/gallery/js/mosaic_mode.js b/ui/file_manager/gallery/js/mosaic_mode.js
index 264dc0ce292a8271213b24fb0cce32a8064b1788..360b27dbff9b97d06e9a177497224f2d02aa8ba5 100644
--- a/ui/file_manager/gallery/js/mosaic_mode.js
+++ b/ui/file_manager/gallery/js/mosaic_mode.js
@@ -547,7 +547,7 @@ Mosaic.prototype.onContentChange_ = function(event) {
if (!this.tiles_)
return;
- if (!event.metadata)
+ if (!event.thumbnailChanged)
return; // Thumbnail unchanged, nothing to do.
var index = this.dataModel_.indexOf(event.item);
@@ -2054,7 +2054,6 @@ Mosaic.Tile.prototype.markUnloaded = function() {
* target dimensions using metadata.
*/
Mosaic.Tile.prototype.init = function() {
- var metadata = this.getItem().getMetadata();
this.markUnloaded();
this.left_ = null; // Mark as not laid out.
@@ -2065,7 +2064,7 @@ Mosaic.Tile.prototype.init = function() {
this.thumbnailLoader_ = new ThumbnailLoader(
this.getItem().getEntry(),
ThumbnailLoader.LoaderType.CANVAS,
- metadata,
+ this.getItem().getThumbnailMetadataItem(),
undefined, // Media type.
[
ThumbnailLoader.LoadTarget.EXTERNAL_METADATA,
@@ -2079,7 +2078,7 @@ Mosaic.Tile.prototype.init = function() {
this.thumbnailPreloader_ = new ThumbnailLoader(
this.getItem().getEntry(),
ThumbnailLoader.LoaderType.CANVAS,
- metadata,
+ this.getItem().getThumbnailMetadataItem(),
undefined, // Media type.
[
ThumbnailLoader.LoadTarget.CONTENT_METADATA

Powered by Google App Engine
This is Rietveld 408576698