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 // Error codes used by providing extensions in response to requests. For | 10 // Error codes used by providing extensions in response to requests. For |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 // Options for the <code>onCreateDirectoryRequested()</code> event. | 111 // Options for the <code>onCreateDirectoryRequested()</code> event. |
112 dictionary CreateDirectoryRequestedOptions { | 112 dictionary CreateDirectoryRequestedOptions { |
113 DOMString fileSystemId; | 113 DOMString fileSystemId; |
114 long requestId; | 114 long requestId; |
115 DOMString directoryPath; | 115 DOMString directoryPath; |
116 boolean exclusive; | 116 boolean exclusive; |
117 boolean recursive; | 117 boolean recursive; |
118 }; | 118 }; |
119 | 119 |
| 120 // Options for the <code>onDeleteEntryRequested()</code> event. |
| 121 dictionary DeleteEntryRequestedOptions { |
| 122 DOMString fileSystemId; |
| 123 long requestId; |
| 124 DOMString entryPath; |
| 125 boolean recursive; |
| 126 }; |
| 127 |
120 // Callback to receive the result of mount() function. | 128 // Callback to receive the result of mount() function. |
121 callback MountCallback = void([nodoc, instanceOf=DOMError] object error); | 129 callback MountCallback = void([nodoc, instanceOf=DOMError] object error); |
122 | 130 |
123 // Callback to receive the result of unmount() function. | 131 // Callback to receive the result of unmount() function. |
124 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); | 132 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); |
125 | 133 |
126 // Callback to handle an error raised from the browser. | 134 // Callback to handle an error raised from the browser. |
127 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); | 135 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); |
128 | 136 |
129 // Callback to be called by the providing extension in case of a success. | 137 // Callback to be called by the providing extension in case of a success. |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 // Raised when contents of a file opened previously with <code>openRequestId | 228 // Raised when contents of a file opened previously with <code>openRequestId |
221 // </code>. The results should be returned in chunks by calling <code> | 229 // </code>. The results should be returned in chunks by calling <code> |
222 // successCallback</code> several times. In case of an error, <code> | 230 // successCallback</code> several times. In case of an error, <code> |
223 // errorCallback</code> must be called. | 231 // errorCallback</code> must be called. |
224 [maxListeners=1] static void onReadFileRequested( | 232 [maxListeners=1] static void onReadFileRequested( |
225 ReadFileRequestedOptions options, | 233 ReadFileRequestedOptions options, |
226 FileDataCallback successCallback, | 234 FileDataCallback successCallback, |
227 ProviderErrorCallback errorCallback); | 235 ProviderErrorCallback errorCallback); |
228 | 236 |
229 // Raised when creating a directory is requested. If <code>exclusive</code> | 237 // Raised when creating a directory is requested. If <code>exclusive</code> |
230 // is set to true, then the operation should fail if the target directory | 238 // is set to true, then the operation must fail if the target directory |
231 // already exists. If <code>recursive</code> is true, then all of the | 239 // already exists. If <code>recursive</code> is true, then all of the |
232 // missing directories on the directory path should be created. | 240 // missing directories on the directory path must be created. |
233 [maxListeners=1, nodoc] static void onCreateDirectoryRequested( | 241 [maxListeners=1, nodoc] static void onCreateDirectoryRequested( |
234 CreateDirectoryRequestedOptions options, | 242 CreateDirectoryRequestedOptions options, |
235 ProviderSuccessCallback successCallback, | 243 ProviderSuccessCallback successCallback, |
236 ProviderErrorCallback errorCallback); | 244 ProviderErrorCallback errorCallback); |
| 245 |
| 246 // Raised when deleting an entry is requested. If <code>recursive</code> is |
| 247 // true, and the entry is a directory, then all of the entries inside |
| 248 // must be recursively deleted as well. |
| 249 [maxListeners=1, nodoc] static void onDeleteEntryRequested( |
| 250 DeleteEntryRequestedOptions options, |
| 251 ProviderSuccessCallback successCallback, |
| 252 ProviderErrorCallback errorCallback); |
237 }; | 253 }; |
238 }; | 254 }; |
239 | 255 |
OLD | NEW |