| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 long requestId; | 83 long requestId; |
| 84 DOMString directoryPath; | 84 DOMString directoryPath; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 // Options for the <code>onOpenFileRequested()</code> event. | 87 // Options for the <code>onOpenFileRequested()</code> event. |
| 88 dictionary OpenFileRequestedOptions { | 88 dictionary OpenFileRequestedOptions { |
| 89 DOMString fileSystemId; | 89 DOMString fileSystemId; |
| 90 long requestId; | 90 long requestId; |
| 91 DOMString filePath; | 91 DOMString filePath; |
| 92 OpenFileMode mode; | 92 OpenFileMode mode; |
| 93 boolean create; | |
| 94 }; | 93 }; |
| 95 | 94 |
| 96 // Options for the <code>onCloseFileRequested()</code> event. | 95 // Options for the <code>onCloseFileRequested()</code> event. |
| 97 dictionary CloseFileRequestedOptions { | 96 dictionary CloseFileRequestedOptions { |
| 98 DOMString fileSystemId; | 97 DOMString fileSystemId; |
| 99 long requestId; | 98 long requestId; |
| 100 long openRequestId; | 99 long openRequestId; |
| 101 }; | 100 }; |
| 102 | 101 |
| 103 // Options for the <code>onReadFileRequested()</code> event. | 102 // Options for the <code>onReadFileRequested()</code> event. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 187 |
| 189 // Raised when contents of a directory at <code>directoryPath</code> are | 188 // Raised when contents of a directory at <code>directoryPath</code> are |
| 190 // requested. The results should be returned in chunks by calling the <code> | 189 // requested. The results should be returned in chunks by calling the <code> |
| 191 // successCallback</code> several times. In case of an error, <code> | 190 // successCallback</code> several times. In case of an error, <code> |
| 192 // errorCallback</code> must be called. | 191 // errorCallback</code> must be called. |
| 193 [maxListeners=1] static void onReadDirectoryRequested( | 192 [maxListeners=1] static void onReadDirectoryRequested( |
| 194 ReadDirectoryRequestedOptions options, | 193 ReadDirectoryRequestedOptions options, |
| 195 EntriesCallback successCallback, | 194 EntriesCallback successCallback, |
| 196 ProviderErrorCallback errorCallback); | 195 ProviderErrorCallback errorCallback); |
| 197 | 196 |
| 198 // Raised when opening a file at <code>filePath</code> is requested. | 197 // Raised when opening a file at <code>filePath</code> is requested. If the |
| 199 // If <code>create</code> is set to <code>true</code> and the file does not | 198 // file does not exist, then the operation must fail. |
| 200 // exist, then it should be created. | |
| 201 [maxListeners=1] static void onOpenFileRequested( | 199 [maxListeners=1] static void onOpenFileRequested( |
| 202 OpenFileRequestedOptions options, | 200 OpenFileRequestedOptions options, |
| 203 ProviderSuccessCallback successCallback, | 201 ProviderSuccessCallback successCallback, |
| 204 ProviderErrorCallback errorCallback); | 202 ProviderErrorCallback errorCallback); |
| 205 | 203 |
| 206 // Raised when opening a file previously opened with <code>openRequestId | 204 // Raised when opening a file previously opened with <code>openRequestId |
| 207 // </code> is requested to be closed. | 205 // </code> is requested to be closed. |
| 208 [maxListeners=1] static void onCloseFileRequested( | 206 [maxListeners=1] static void onCloseFileRequested( |
| 209 CloseFileRequestedOptions options, | 207 CloseFileRequestedOptions options, |
| 210 ProviderSuccessCallback successCallback, | 208 ProviderSuccessCallback successCallback, |
| 211 ProviderErrorCallback errorCallback); | 209 ProviderErrorCallback errorCallback); |
| 212 | 210 |
| 213 // Raised when contents of a file opened previously with <code>openRequestId | 211 // Raised when contents of a file opened previously with <code>openRequestId |
| 214 // </code>. The results should be returned in chunks by calling <code> | 212 // </code>. The results should be returned in chunks by calling <code> |
| 215 // successCallback</code> several times. In case of an error, <code> | 213 // successCallback</code> several times. In case of an error, <code> |
| 216 // errorCallback</code> must be called. | 214 // errorCallback</code> must be called. |
| 217 [maxListeners=1] static void onReadFileRequested( | 215 [maxListeners=1] static void onReadFileRequested( |
| 218 ReadFileRequestedOptions options, | 216 ReadFileRequestedOptions options, |
| 219 FileDataCallback successCallback, | 217 FileDataCallback successCallback, |
| 220 ProviderErrorCallback errorCallback); | 218 ProviderErrorCallback errorCallback); |
| 221 }; | 219 }; |
| 222 }; | 220 }; |
| 223 | 221 |
| OLD | NEW |