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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 boolean recursive; | 126 boolean recursive; |
127 }; | 127 }; |
128 | 128 |
129 // Options for the <code>onCreateFileRequested()</code> event. | 129 // Options for the <code>onCreateFileRequested()</code> event. |
130 dictionary CreateFileRequestedOptions { | 130 dictionary CreateFileRequestedOptions { |
131 DOMString fileSystemId; | 131 DOMString fileSystemId; |
132 long requestId; | 132 long requestId; |
133 DOMString filePath; | 133 DOMString filePath; |
134 }; | 134 }; |
135 | 135 |
| 136 // Options for the <code>onCopyEntryRequested()</code> event. |
| 137 dictionary CopyEntryRequestedOptions { |
| 138 DOMString fileSystemId; |
| 139 long requestId; |
| 140 DOMString sourcePath; |
| 141 DOMString targetPath; |
| 142 }; |
| 143 |
136 // Callback to receive the result of mount() function. | 144 // Callback to receive the result of mount() function. |
137 callback MountCallback = void([nodoc, instanceOf=DOMError] object error); | 145 callback MountCallback = void([nodoc, instanceOf=DOMError] object error); |
138 | 146 |
139 // Callback to receive the result of unmount() function. | 147 // Callback to receive the result of unmount() function. |
140 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); | 148 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); |
141 | 149 |
142 // Callback to handle an error raised from the browser. | 150 // Callback to handle an error raised from the browser. |
143 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); | 151 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); |
144 | 152 |
145 // Callback to be called by the providing extension in case of a success. | 153 // Callback to be called by the providing extension in case of a success. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 ProviderSuccessCallback successCallback, | 267 ProviderSuccessCallback successCallback, |
260 ProviderErrorCallback errorCallback); | 268 ProviderErrorCallback errorCallback); |
261 | 269 |
262 // Raised when creating a file is requested. If the file already exists, | 270 // Raised when creating a file is requested. If the file already exists, |
263 // then <code>errorCallback</code> must be called with the <code>EXISTS | 271 // then <code>errorCallback</code> must be called with the <code>EXISTS |
264 // </code> error code. | 272 // </code> error code. |
265 [maxListeners=1, nodoc] static void onCreateFileRequested( | 273 [maxListeners=1, nodoc] static void onCreateFileRequested( |
266 CreateFileRequestedOptions options, | 274 CreateFileRequestedOptions options, |
267 ProviderSuccessCallback successCallback, | 275 ProviderSuccessCallback successCallback, |
268 ProviderErrorCallback errorCallback); | 276 ProviderErrorCallback errorCallback); |
| 277 |
| 278 // Raised when copying an entry (recursively if a directory) is requested. |
| 279 // If an error occurs, then <code>errorCallback</code> must be called. |
| 280 [maxListeners=1, nodoc] static void onCopyEntryRequested( |
| 281 CopyEntryRequestedOptions options, |
| 282 ProviderSuccessCallback successCallback, |
| 283 ProviderErrorCallback errorCallback); |
269 }; | 284 }; |
270 }; | 285 }; |
271 | 286 |
OLD | NEW |