Chromium Code Reviews| Index: chrome/common/extensions/api/file_system.idl |
| diff --git a/chrome/common/extensions/api/file_system.idl b/chrome/common/extensions/api/file_system.idl |
| index 8cb65f50b31af26593f4ded3b3bbf850f1764113..3d5e182aac0a252e130ea4399326c4df0fcae5d7 100644 |
| --- a/chrome/common/extensions/api/file_system.idl |
| +++ b/chrome/common/extensions/api/file_system.idl |
| @@ -83,7 +83,16 @@ namespace fileSystem { |
| boolean? acceptsMultiple; |
| }; |
| - // Change to an entry within a tracked directory. |
| + dictionary RequestFileSystemOptions { |
| + // The ID of the requested volume. |
| + DOMString volumeId; |
| + |
| + // Whether the requested file system should be writeable, or read-only. |
| + // By default read-only. |
| + boolean? writable; |
| + }; |
| + |
| +// Change to an entry within a tracked directory. |
| [nodoc] dictionary ChildChange { |
| [instanceOf=Entry] object entry; |
| ChildChangeType type; |
| @@ -105,6 +114,11 @@ namespace fileSystem { |
| [instanceOf=Entry] object target; |
| }; |
| + // Represents a volume available in the system. |
| + [nodoc] dictionary Volume { |
| + DOMString volumeId; |
| + }; |
| + |
| callback GetDisplayPathCallback = void (DOMString displayPath); |
| callback EntryCallback = void ([instanceOf=Entry] object entry); |
| callback EntriesCallback = void ( |
| @@ -114,6 +128,9 @@ namespace fileSystem { |
| callback IsRestorableCallback = void (boolean isRestorable); |
| [nodoc] callback GetObservedEntriesCallback = void ( |
| [instanceOf=Entry] object[] entries); |
| + [nodoc] callback RequestFileSystemCallback = void( |
| + [instanceOf=FileSystem] optional object fileSystem); |
| + [nodoc] callback GetVolumeListCallback = void(Volume[] volumes); |
| interface Functions { |
| // Get the display path of an Entry object. The display path is based on |
| @@ -154,6 +171,19 @@ namespace fileSystem { |
| // running and across restarts. |
| static DOMString retainEntry([instanceOf=Entry] object entry); |
| + // Requests access to a file system for a volume represented by <code> |
| + // options.volumeId</code>. If <code>options.writable</code> is set to true, |
| + // then the file system will be writable. Otherwise, it will be read-only. |
| + // The <code>writable</code> option requires the <code> |
| + // "fileSystem": {"write"}</code> permission in the manifest. Available to |
| + // kiosk apps running in kiosk session only. |
| + [nodoc] static void requestFileSystem(RequestFileSystemOptions options, |
| + RequestFileSystemCallback callback); |
| + |
| + // Fetches a list of available volumes to be mounted. Available to kiosk |
| + // apps running in kiosk session only. |
| + // [nodoc] static void getVolumeList(GetVolumeListCallback callback); |
|
benwells
2015/03/20 00:42:39
Why is this commented out?
mtomasz
2015/03/20 01:56:01
It shouldn't be here. I removed the idl which is n
|
| + |
| // Observes a directory entry. Emits an event if the tracked directory is |
| // changed (including the list of files on it), or removed. If <code> |
| // recursive</code> is set to true, then also all accessible subdirectories |
| @@ -184,5 +214,9 @@ namespace fileSystem { |
| // Called when an observed entry is removed. |
| [nodoc] static void onEntryRemoved(EntryRemovedEvent event); |
| + |
| + // Called when the list of volumes available in the system is changed. |
| + // Available to kiosk apps running in kiosk session only. |
| + [nodoc] static void onVolumeListChanged(); |
|
benwells
2015/03/20 00:42:39
Any reason why the volume list isn't passed in?
M
mtomasz
2015/03/20 01:56:01
We can pass. Let's do it in a separate CL. Removed
|
| }; |
| }; |