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

Unified Diff: chrome/common/extensions/api/file_system.idl

Issue 985533004: Implement chrome.fileSystem.requestFileSystem(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed kiosk mode. Created 5 years, 9 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: 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..45a0c86c8f7c3fe315195c3df0cf4912463237dc 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;
@@ -114,6 +123,8 @@ namespace fileSystem {
callback IsRestorableCallback = void (boolean isRestorable);
[nodoc] callback GetObservedEntriesCallback = void (
[instanceOf=Entry] object[] entries);
+ [nodoc] callback RequestFileSystemCallback = void(
+ [instanceOf=FileSystem] optional object fileSystem);
interface Functions {
// Get the display path of an Entry object. The display path is based on
@@ -154,6 +165,15 @@ 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);
+
// 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

Powered by Google App Engine
This is Rietveld 408576698