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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 }; | 142 }; |
143 | 143 |
144 // Options for the <code>onMoveEntryRequested()</code> event. | 144 // Options for the <code>onMoveEntryRequested()</code> event. |
145 dictionary MoveEntryRequestedOptions { | 145 dictionary MoveEntryRequestedOptions { |
146 DOMString fileSystemId; | 146 DOMString fileSystemId; |
147 long requestId; | 147 long requestId; |
148 DOMString sourcePath; | 148 DOMString sourcePath; |
149 DOMString targetPath; | 149 DOMString targetPath; |
150 }; | 150 }; |
151 | 151 |
| 152 // Options for the <code>onTruncateRequested()</code> event. |
| 153 dictionary TruncateRequestedOptions { |
| 154 DOMString fileSystemId; |
| 155 long requestId; |
| 156 DOMString filePath; |
| 157 double length; |
| 158 }; |
| 159 |
152 // Callback to receive the result of mount() function. | 160 // Callback to receive the result of mount() function. |
153 callback MountCallback = void([nodoc, instanceOf=DOMError] object error); | 161 callback MountCallback = void([nodoc, instanceOf=DOMError] object error); |
154 | 162 |
155 // Callback to receive the result of unmount() function. | 163 // Callback to receive the result of unmount() function. |
156 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); | 164 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); |
157 | 165 |
158 // Callback to handle an error raised from the browser. | 166 // Callback to handle an error raised from the browser. |
159 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); | 167 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); |
160 | 168 |
161 // Callback to be called by the providing extension in case of a success. | 169 // Callback to be called by the providing extension in case of a success. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 CopyEntryRequestedOptions options, | 297 CopyEntryRequestedOptions options, |
290 ProviderSuccessCallback successCallback, | 298 ProviderSuccessCallback successCallback, |
291 ProviderErrorCallback errorCallback); | 299 ProviderErrorCallback errorCallback); |
292 | 300 |
293 // Raised when moving an entry (recursively if a directory) is requested. | 301 // Raised when moving an entry (recursively if a directory) is requested. |
294 // If an error occurs, then <code>errorCallback</code> must be called. | 302 // If an error occurs, then <code>errorCallback</code> must be called. |
295 [maxListeners=1, nodoc] static void onMoveEntryRequested( | 303 [maxListeners=1, nodoc] static void onMoveEntryRequested( |
296 MoveEntryRequestedOptions options, | 304 MoveEntryRequestedOptions options, |
297 ProviderSuccessCallback successCallback, | 305 ProviderSuccessCallback successCallback, |
298 ProviderErrorCallback errorCallback); | 306 ProviderErrorCallback errorCallback); |
| 307 |
| 308 // Raised when truncating a file to a desired length is requested. |
| 309 // If an error occurs, then <code>errorCallback</code> must be called. |
| 310 [maxListeners=1, nodoc] static void onTruncateRequested( |
| 311 TruncateRequestedOptions options, |
| 312 ProviderSuccessCallback successCallback, |
| 313 ProviderErrorCallback errorCallback); |
299 }; | 314 }; |
300 }; | 315 }; |
301 | 316 |
OLD | NEW |