| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 // Options for the <code>onReadFileRequested()</code> event. | 103 // Options for the <code>onReadFileRequested()</code> event. |
| 104 dictionary ReadFileRequestedOptions { | 104 dictionary ReadFileRequestedOptions { |
| 105 DOMString fileSystemId; | 105 DOMString fileSystemId; |
| 106 long requestId; | 106 long requestId; |
| 107 long openRequestId; | 107 long openRequestId; |
| 108 double offset; | 108 double offset; |
| 109 double length; | 109 double length; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 // Options for the <code>onCreateDirectoryRequested()</code> event. |
| 113 dictionary CreateDirectoryRequestedOptions { |
| 114 DOMString fileSystemId; |
| 115 long requestId; |
| 116 DOMString directoryPath; |
| 117 boolean exclusive; |
| 118 boolean recursive; |
| 119 }; |
| 120 |
| 112 // Callback to receive the result of mount() function. | 121 // Callback to receive the result of mount() function. |
| 113 callback MountCallback = void([nodoc, instanceOf=DOMError] object error); | 122 callback MountCallback = void([nodoc, instanceOf=DOMError] object error); |
| 114 | 123 |
| 115 // Callback to receive the result of unmount() function. | 124 // Callback to receive the result of unmount() function. |
| 116 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); | 125 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); |
| 117 | 126 |
| 118 // Callback to handle an error raised from the browser. | 127 // Callback to handle an error raised from the browser. |
| 119 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); | 128 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); |
| 120 | 129 |
| 121 // Callback to be called by the providing extension in case of a success. | 130 // Callback to be called by the providing extension in case of a success. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 ProviderErrorCallback errorCallback); | 220 ProviderErrorCallback errorCallback); |
| 212 | 221 |
| 213 // Raised when contents of a file opened previously with <code>openRequestId | 222 // Raised when contents of a file opened previously with <code>openRequestId |
| 214 // </code>. The results should be returned in chunks by calling <code> | 223 // </code>. The results should be returned in chunks by calling <code> |
| 215 // successCallback</code> several times. In case of an error, <code> | 224 // successCallback</code> several times. In case of an error, <code> |
| 216 // errorCallback</code> must be called. | 225 // errorCallback</code> must be called. |
| 217 [maxListeners=1] static void onReadFileRequested( | 226 [maxListeners=1] static void onReadFileRequested( |
| 218 ReadFileRequestedOptions options, | 227 ReadFileRequestedOptions options, |
| 219 FileDataCallback successCallback, | 228 FileDataCallback successCallback, |
| 220 ProviderErrorCallback errorCallback); | 229 ProviderErrorCallback errorCallback); |
| 230 |
| 231 // Raised when creating a directory is requested. If <code>exclusive</code> |
| 232 // is set to true, then the operation should fail if the target directory |
| 233 // already exists. If <code>recursive</code> is true, then all of the |
| 234 // missing directories on the directory path should be created. |
| 235 [maxListeners=1, nodoc] static void onCreateDirectoryRequested( |
| 236 CreateDirectoryRequestedOptions options, |
| 237 ProviderSuccessCallback successCallback, |
| 238 ProviderErrorCallback errorCallback); |
| 221 }; | 239 }; |
| 222 }; | 240 }; |
| 223 | 241 |
| OLD | NEW |