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

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

Issue 853653004: Gallery: Add items to GalleryDataModel before loading their metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 8 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 c9088d81e619a317d0f0467e7c0671d0f1bf7e48..41353c55ea31ffe8834f7b6d3dafde7f0bb19983 100644
--- a/ui/file_manager/gallery/js/gallery_item.js
+++ b/ui/file_manager/gallery/js/gallery_item.js
@@ -7,8 +7,8 @@
*
* @param {!FileEntry} entry Image entry.
* @param {!EntryLocation} locationInfo Entry location information.
- * @param {!MetadataItem} metadataItem
- * @param {!ThumbnailMetadataItem} thumbnailMetadataItem
+ * @param {MetadataItem} metadataItem
+ * @param {ThumbnailMetadataItem} thumbnailMetadataItem
* @param {boolean} original Whether the entry is original or edited.
* @constructor
* @struct
@@ -26,12 +26,12 @@ Gallery.Item = function(
this.locationInfo_ = locationInfo;
/**
- * @private {!MetadataItem}
+ * @private {MetadataItem}
*/
this.metadataItem_ = metadataItem;
/**
- * @private {!ThumbnailMetadataItem}
+ * @private {ThumbnailMetadataItem}
*/
this.thumbnailMetadataItem_ = metadataItem;
@@ -81,20 +81,34 @@ Gallery.Item.prototype.getLocationInfo = function() {
};
/**
- * @return {!MetadataItem} Metadata.
+ * @return {MetadataItem} Metadata.
*/
Gallery.Item.prototype.getMetadataItem = function() {
return this.metadataItem_;
};
/**
- * @return {!ThumbnailMetadataItem} Thumbnail metadata item.
+ * @param {!MetadataItem} metadata
+ */
+Gallery.Item.prototype.setMetadataItem = function(metadata) {
+ this.metadataItem_ = metadata;
+};
+
+/**
+ * @return {ThumbnailMetadataItem} Thumbnail metadata item.
*/
Gallery.Item.prototype.getThumbnailMetadataItem = function() {
return this.thumbnailMetadataItem_;
};
/**
+ * @param {!ThumbnailMetadataItem} item Thumbnail metadata item.
+ */
+Gallery.Item.prototype.setThumbnailMetadataItem = function(item) {
+ this.thumbnailMetadataItem_ = item;
+};
+
+/**
* @return {string} File name.
*/
Gallery.Item.prototype.getFileName = function() {
« no previous file with comments | « ui/file_manager/gallery/js/gallery_data_model_unittest.js ('k') | ui/file_manager/gallery/js/image_editor/image_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698