Index: chrome/common/extensions/api/file_system_provider.idl |
diff --git a/chrome/common/extensions/api/file_system_provider.idl b/chrome/common/extensions/api/file_system_provider.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d4b1e82b8455ad9edc1bf9a2ff8fb0d9fe47c6ce |
--- /dev/null |
+++ b/chrome/common/extensions/api/file_system_provider.idl |
@@ -0,0 +1,38 @@ |
+// Copyright 2013 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. |
+ |
+// [platforms=("chromeos")] |
+namespace fileSystemProvider { |
+ // TODO(satorux): Switch to DOMError once crbug.com/313131 is fixed. |
+ // http://www.w3.org/TR/file-system-api/#errors-and-exceptions |
+ dictionary Error { |
+ // On success, the value is "OK". On error, one of names described at the |
+ // following URL is set. |
+ // http://www.w3.org/TR/file-system-api/#errors-and-exceptions |
+ DOMString name; |
+ }; |
+ |
+ // Callback to receive the result of mount() function. <code>error</code> |
+ // indicates if the request was successful or not. See <code>Error</code> |
+ // for details. |
+ // |
+ // On success, <code>fileSystemID</code> will be a unique ID for the file |
+ // system just mounted. <code>fileSystemID</code> is undefined on error. |
+ // The ID is used to distinguish multiple file systems mounted from a |
+ // single File System Provider. |
+ callback MountCallback = void(Error error, |
+ DOMString fileSystemId); |
+ |
+ interface Functions { |
+ // Mounts a file system with the given |
+ // <code>displayName</code>. <code>displayName</code> will be shown in |
+ // the left panel of Files.app. <code>displayName</code> can contain any |
+ // characters including '/'. <code>displayName</code> should be |
+ // descritive but doesn't have to be unique. Duplicate display names are |
+ // uniquified by adding suffix like "(1)" in the Files.app UI. An empty |
+ // display name is not allowed. |
+ static void mount(DOMString displayName, |
+ MountCallback callback); |
+ }; |
+}; |