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

Unified Diff: ui/file_manager/gallery/js/gallery_item.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: 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/gallery_item.js
diff --git a/ui/file_manager/gallery/js/gallery_item.js b/ui/file_manager/gallery/js/gallery_item.js
index 227940a63eeb78b878c0459c841d4eb4c23d59fc..088da41af9359de0d73416de9de9d9925d509d73 100644
--- a/ui/file_manager/gallery/js/gallery_item.js
+++ b/ui/file_manager/gallery/js/gallery_item.js
@@ -9,12 +9,14 @@
* @param {!EntryLocation} locationInfo Entry location information.
* @param {!Object} metadata Metadata for the entry.
* @param {!MetadataCache} metadataCache Metadata cache instance.
+ * @param {!FileSystemMetadata} fileSystemMetadata File system metadata.
* @param {boolean} original Whether the entry is original or edited.
* @constructor
* @struct
*/
Gallery.Item = function(
- entry, locationInfo, metadata, metadataCache, original) {
+ entry, locationInfo, metadata, metadataCache, fileSystemMetadata,
+ original) {
/**
* @type {!FileEntry}
* @private
@@ -40,6 +42,13 @@ Gallery.Item = function(
*/
this.metadataCache_ = metadataCache;
+ /**
+ * @type {!FileSystemMetadata}
+ * @private
+ * @const
+ */
+ this.fileSystemMetadata_ = fileSystemMetadata;
+
// TODO(yawano): Change this.contentImage and this.screenImage to private
// fields and provide utility methods for them (e.g. revokeFullImageCache).
/**
@@ -262,6 +271,7 @@ Gallery.Item.prototype.saveToFile = function(
opt_callback(false);
}
}.bind(this));
+ this.fileSystemMetadata_.notifyEntriesChanged([this.entry_]);
}.bind(this);
var onError = function(error) {

Powered by Google App Engine
This is Rietveld 408576698