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

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

Issue 529413002: Rename DriveProvider to ExternalProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/gallery.js ('k') | ui/file_manager/gallery/js/image_editor/image_view.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_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;
};
/**
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/gallery/js/image_editor/image_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698