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

Unified Diff: ui/file_manager/externs/volume_info.js

Issue 2260133002: Files: Extract VolumeInfo interface from volume_manager.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 4 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/externs/volume_info.js
diff --git a/ui/file_manager/externs/volume_info.js b/ui/file_manager/externs/volume_info.js
new file mode 100644
index 0000000000000000000000000000000000000000..fb8684ec3825ee6b8e6bc529138d2a205187a652
--- /dev/null
+++ b/ui/file_manager/externs/volume_info.js
@@ -0,0 +1,107 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * Represents each volume, such as "drive", "download directory", each "USB
+ * flush storage", or "mounted zip archive" etc.
+ * @interface
+ */
+function VolumeInfo() {};
+
+/** @type {VolumeManagerCommon.VolumeType} */
+VolumeInfo.prototype.volumeType;
+
+/** @type {string} */
+VolumeInfo.prototype.volumeId;
+
+/** @type {FileSystem} */
+VolumeInfo.prototype.fileSystem;
+
+/**
+ * Display root path. It is null before finishing to resolve the entry.
+ * @type {DirectoryEntry}
+ */
+VolumeInfo.prototype.displayRoot;
+
+/**
+ * The volume's fake entries such as Recent, Offline, Shared with me, etc...
+ * in Google Drive.
+ * @type {Object<!FakeEntry>}}
+ */
+VolumeInfo.prototype.fakeEntries;
+
+/**
+ * This represents if the mounting of the volume is successfully done or not.
+ * (If error is empty string, the mount is successfully done)
+ * @type {(string|undefined)}
+ */
+VolumeInfo.prototype.error;
+
+/**
+ * The type of device. (e.g. USB, SD card, DVD etc.)
+ * @type {(string|undefined)}
+ */
+VolumeInfo.prototype.deviceType;
+
+/**
+ * If the volume is removable, devicePath is the path of the system device this
+ * device's block is a part of. (e.g. /sys/devices/pci0000:00/.../8:0:0:0/)
+ * Otherwise, this should be empty.
+ * @type {(string|undefined)}
+ */
+VolumeInfo.prototype.devicePath;
+
+/** @type {boolean} */
+VolumeInfo.prototype.isReadOnly;
+
+/** @type {!{displayName:string, isCurrentProfile:boolean}} */
+VolumeInfo.prototype.profile;
+
+/**
+ * Label for the volume if the volume is either removable or a provided file
+ * system. In case of removables, if disk is a parent, then its label, else
+ * parent's label (e.g. "TransMemory").
+ * @type {string}
+ */
+VolumeInfo.prototype.label;
+
+/**
+ * ID of an extennsion providing this volume.
+ * @type {(string|undefined)}
+ */
+VolumeInfo.prototype.extensionId;
+
+/**
+ * True if the volume contains media.
+ * @type {boolean}
+ */
+VolumeInfo.prototype.hasMedia;
+
+/**
+ * True if the volume is configurable.
+ * See https://developer.chrome.com/apps/fileSystemProvider.
+ * @type {boolean}
+ */
+VolumeInfo.prototype.configurable;
+
+/**
+ * True if the volume notifies about changes via file/directory watchers.
+ * @type {boolean}
+ */
+VolumeInfo.prototype.watchable;
+
+/** @type {VolumeManagerCommon.Source} */
+VolumeInfo.prototype.source;
+
+/**
+ * Starts resolving the display root and obtains it. It may take long time for
+ * Drive. Once resolved, it is cached.
+ *
+ * @param {function(!DirectoryEntry)=} opt_onSuccess Success callback with the
+ * display root directory as an argument.
+ * @param {function(*)=} opt_onFailure Failure callback.
+ * @return {!Promise.<!DirectoryEntry>}
+ */
+VolumeInfo.prototype.resolveDisplayRoot = function(
+ opt_onSuccess, opt_onFailure) {};
« no previous file with comments | « ui/file_manager/externs/compiled_resources2.gyp ('k') | ui/file_manager/file_manager/background/js/compiled_resources.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698