OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Use the <code>chrome.fileSystemProvider</code> API to create file systems, | 5 // Use the <code>chrome.fileSystemProvider</code> API to create file systems, |
6 // that can be accessible from the file manager on Chrome OS. | 6 // that can be accessible from the file manager on Chrome OS. |
7 [platforms=("chromeos"), | 7 [platforms=("chromeos"), |
8 implemented_in="chrome/browser/chromeos/extensions/file_system_provider/file_sy
stem_provider_api.h"] | 8 implemented_in="chrome/browser/chromeos/extensions/file_system_provider/file_sy
stem_provider_api.h"] |
9 namespace fileSystemProvider { | 9 namespace fileSystemProvider { |
10 // Callback to receive the result of mount() function. | 10 // Callback to receive the result of mount() function. |
11 // <code>fileSystemID</code> will be a unique ID for the file system just | 11 // <code>fileSystemID</code> will be a unique ID for the file system just |
12 // mounted. The ID is used to distinguish multiple file systems mounted | 12 // mounted. The ID is used to distinguish multiple file systems mounted |
13 // from a single File System Provider. | 13 // from a single File System Provider. |
14 callback MountCallback = void(DOMString fileSystemId, | 14 callback MountCallback = void(long fileSystemId, |
15 [nodoc, instanceOf=DOMError] object error); | 15 [nodoc, instanceOf=DOMError] object error); |
16 | 16 |
17 // Callback to handle an error raised from the browser. | 17 // Callback to handle an error raised from the browser. |
18 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); | 18 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); |
19 | 19 |
20 interface Functions { | 20 interface Functions { |
21 // Mounts a file system with the given <code>displayName</code>. | 21 // Mounts a file system with the given <code>displayName</code>. |
22 // <code>displayName</code> will be shown in the left panel of | 22 // <code>displayName</code> will be shown in the left panel of |
23 // Files.app. <code>displayName</code> can contain any characters | 23 // Files.app. <code>displayName</code> can contain any characters |
24 // including '/', but cannot be an empty string. <code>displayName</code> | 24 // including '/', but cannot be an empty string. <code>displayName</code> |
25 // should be descritive but doesn't have to be unique. Duplicate display | 25 // should be descritive but doesn't have to be unique. Duplicate display |
26 // names are uniquified by adding suffix like "(1)" in the Files.app UI. | 26 // names are uniquified by adding suffix like "(1)" in the Files.app UI. |
27 static void mount(DOMString displayName, | 27 static void mount(DOMString displayName, |
28 MountCallback successCallback, | 28 MountCallback successCallback, |
29 [nocompile] ErrorCallback errorCallback); | 29 [nocompile] ErrorCallback errorCallback); |
30 }; | 30 }; |
31 }; | 31 }; |
OLD | NEW |