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 e6114653d6870db297ef753150a3b6298b8c82d6..2eb8f8719d382d2a7853c9c3dd9c23824de7c4ad 100644 |
--- a/ui/file_manager/gallery/js/gallery_item.js |
+++ b/ui/file_manager/gallery/js/gallery_item.js |
@@ -8,6 +8,7 @@ |
* Object representing an image item (a photo). |
* |
* @param {FileEntry} entry Image entry. |
+ * @param {EntryLocation} locationInfo Entry location information. |
* @param {function():Promise} fethcedMediaProvider Function to provide the |
* fetchedMedia metadata. |
* @param {boolean} original Whether the entry is original or edited. |
@@ -15,7 +16,8 @@ |
* or not. |
* @constructor |
*/ |
-Gallery.Item = function(entry, metadata, metadataCache, original, readonly) { |
+Gallery.Item = function( |
+ entry, locationInfo, metadata, metadataCache, original, readonly) { |
/** |
* @type {FileEntry} |
* @private |
@@ -23,6 +25,12 @@ Gallery.Item = function(entry, metadata, metadataCache, original, readonly) { |
this.entry_ = entry; |
/** |
+ * @type {EntryLocation} |
+ * @private |
+ */ |
+ this.locationInfo_ = locationInfo; |
+ |
+ /** |
* @type {Object} |
* @private |
*/ |
@@ -78,6 +86,13 @@ Gallery.Item = function(entry, metadata, metadataCache, original, readonly) { |
Gallery.Item.prototype.getEntry = function() { return this.entry_; }; |
/** |
+ * @return {EntryLocation} Entry location information. |
+ */ |
+Gallery.Item.prototype.getLocationInfo = function() { |
+ return this.locationInfo_; |
+}; |
+ |
+/** |
* @return {Object} Metadata. |
*/ |
Gallery.Item.prototype.getMetadata = function() { return this.metadata_; }; |
@@ -127,15 +142,14 @@ Gallery.Item.prototype.isOriginal = function() { return this.original_; }; |
* @return {boolean} Whther the item is located at a readonly directory. |
*/ |
Gallery.Item.prototype.isReadOnly = function() { |
- return this.isReadOnly_; |
+ return this.isReadOnly_; |
}; |
/** |
- * Obtains the item is on the drive volume or not. |
- * @return {boolean} True if the item is on the drive volume. |
+ * @return {boolean} Whther the item supports sharing, or not. |
*/ |
-Gallery.Item.prototype.isOnDrive = function() { |
- return !!this.metadata_.drive; |
+Gallery.Item.prototype.isShareable = function() { |
hirono
2014/09/04 03:45:02
Is it used?
|
+ return this.locationInfo_.isShareable; |
}; |
/** |