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

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

Issue 944163004: Files.app: Add new metadata model to Gallery.app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. 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
« no previous file with comments | « ui/file_manager/gallery/js/compiled_resources.gyp ('k') | ui/file_manager/gallery/js/gallery_data_model.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/gallery.js
diff --git a/ui/file_manager/gallery/js/gallery.js b/ui/file_manager/gallery/js/gallery.js
index 07891d48310e035c381ec49ede81b90dabd3a62b..0581168f462d6eb7529bb4284e15a06a2933810d 100644
--- a/ui/file_manager/gallery/js/gallery.js
+++ b/ui/file_manager/gallery/js/gallery.js
@@ -7,6 +7,7 @@
* @type {string}
*/
ContentProvider.WORKER_SCRIPT = '/js/metadata_worker.js';
+ContentMetadataProvider.WORKER_SCRIPT = '/js/metadata_worker.js';
/**
* Gallery for viewing and editing image files.
@@ -51,12 +52,19 @@ function Gallery(volumeManager) {
this.document_ = document;
this.metadataCache_ = this.context_.metadataCache;
this.volumeManager_ = volumeManager;
+ /**
+ * @private {!FileSystemMetadata}
+ * @const
+ */
+ this.fileSystemMetadata_ = FileSystemMetadata.create(
+ new MetadataProviderCache(), volumeManager);
this.selectedEntry_ = null;
this.metadataCacheObserverId_ = null;
this.onExternallyUnmountedBound_ = this.onExternallyUnmounted_.bind(this);
this.dataModel_ = new GalleryDataModel(
- this.context_.metadataCache);
+ this.context_.metadataCache,
+ this.fileSystemMetadata_);
var downloadVolumeInfo = this.volumeManager_.getCurrentProfileVolumeInfo(
VolumeManagerCommon.VolumeType.DOWNLOADS);
downloadVolumeInfo.resolveDisplayRoot().then(function(entry) {
@@ -371,6 +379,7 @@ Gallery.prototype.loadInternal_ = function(entries, selectedEntries) {
locationInfo,
clonedMetadata,
self.metadataCache_,
+ self.fileSystemMetadata_,
/* original */ true));
});
self.dataModel_.push.apply(self.dataModel_, items);
« no previous file with comments | « ui/file_manager/gallery/js/compiled_resources.gyp ('k') | ui/file_manager/gallery/js/gallery_data_model.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698