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