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