Chromium Code Reviews| 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 [implemented_in="chrome/browser/chromeos/extensions/file_system_provider/file_sy stem_provider_api.h"] | 7 [implemented_in="chrome/browser/chromeos/extensions/file_system_provider/file_sy stem_provider_api.h"] |
| 8 namespace fileSystemProvider { | 8 namespace fileSystemProvider { |
| 9 // Error codes used by providing extensions in response to requests as well | 9 // Error codes used by providing extensions in response to requests as well |
| 10 // as in case of errors when calling methods of the API. For success, <code> | 10 // as in case of errors when calling methods of the API. For success, <code> |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 // extension. | 103 // extension. |
| 104 DOMString fileSystemId; | 104 DOMString fileSystemId; |
| 105 | 105 |
| 106 // A human-readable name for the file system. | 106 // A human-readable name for the file system. |
| 107 DOMString displayName; | 107 DOMString displayName; |
| 108 | 108 |
| 109 // Whether the file system supports operations which may change contents | 109 // Whether the file system supports operations which may change contents |
| 110 // of the file system (such as creating, deleting or writing to files). | 110 // of the file system (such as creating, deleting or writing to files). |
| 111 boolean? writable; | 111 boolean? writable; |
| 112 | 112 |
| 113 // Maximum number of opened files at once. If not specified, then not | |
| 114 // limited. | |
| 115 long? openedFilesLimit; | |
| 116 | |
| 113 // Whether the file system supports the <code>tag</code> field for observed | 117 // Whether the file system supports the <code>tag</code> field for observed |
| 114 // directories. Required in order to enable the internal cache. | 118 // directories. Required in order to enable the internal cache. |
| 115 [nodoc] boolean? supportsNotifyTag; | 119 [nodoc] boolean? supportsNotifyTag; |
| 116 }; | 120 }; |
| 117 | 121 |
| 118 // Options for the <code>unmount()</code> method. | 122 // Options for the <code>unmount()</code> method. |
| 119 dictionary UnmountOptions { | 123 dictionary UnmountOptions { |
| 120 // The identifier of the file system to be unmounted. | 124 // The identifier of the file system to be unmounted. |
| 121 DOMString fileSystemId; | 125 DOMString fileSystemId; |
| 122 }; | 126 }; |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 496 // Raised when contents of a directory at <code>directoryPath</code> are | 500 // Raised when contents of a directory at <code>directoryPath</code> are |
| 497 // requested. The results must be returned in chunks by calling the <code> | 501 // requested. The results must be returned in chunks by calling the <code> |
| 498 // successCallback</code> several times. In case of an error, <code> | 502 // successCallback</code> several times. In case of an error, <code> |
| 499 // errorCallback</code> must be called. | 503 // errorCallback</code> must be called. |
| 500 [maxListeners=1] static void onReadDirectoryRequested( | 504 [maxListeners=1] static void onReadDirectoryRequested( |
| 501 ReadDirectoryRequestedOptions options, | 505 ReadDirectoryRequestedOptions options, |
| 502 EntriesCallback successCallback, | 506 EntriesCallback successCallback, |
| 503 ProviderErrorCallback errorCallback); | 507 ProviderErrorCallback errorCallback); |
| 504 | 508 |
| 505 // Raised when opening a file at <code>filePath</code> is requested. If the | 509 // Raised when opening a file at <code>filePath</code> is requested. If the |
| 506 // file does not exist, then the operation must fail. | 510 // file does not exist, then the operation must fail. Maximum number of |
|
benwells
2015/01/09 06:51:29
Nit: "The maximum number of files that can be open
mtomasz
2015/01/09 06:57:55
Done.
| |
| 511 // files opened at once can be specified with <code>MountOptions</code>. | |
| 507 [maxListeners=1] static void onOpenFileRequested( | 512 [maxListeners=1] static void onOpenFileRequested( |
| 508 OpenFileRequestedOptions options, | 513 OpenFileRequestedOptions options, |
| 509 ProviderSuccessCallback successCallback, | 514 ProviderSuccessCallback successCallback, |
| 510 ProviderErrorCallback errorCallback); | 515 ProviderErrorCallback errorCallback); |
| 511 | 516 |
| 512 // Raised when opening a file previously opened with <code>openRequestId | 517 // Raised when opening a file previously opened with <code>openRequestId |
| 513 // </code> is requested to be closed. | 518 // </code> is requested to be closed. |
| 514 [maxListeners=1] static void onCloseFileRequested( | 519 [maxListeners=1] static void onCloseFileRequested( |
| 515 CloseFileRequestedOptions options, | 520 CloseFileRequestedOptions options, |
| 516 ProviderSuccessCallback successCallback, | 521 ProviderSuccessCallback successCallback, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 599 | 604 |
| 600 // Raised when the watcher should be removed. If an error occurs, then | 605 // Raised when the watcher should be removed. If an error occurs, then |
| 601 // <code>errorCallback</code> must be called. | 606 // <code>errorCallback</code> must be called. |
| 602 [maxListeners=1, nodoc] static void onRemoveWatcherRequested( | 607 [maxListeners=1, nodoc] static void onRemoveWatcherRequested( |
| 603 RemoveWatcherRequestedOptions options, | 608 RemoveWatcherRequestedOptions options, |
| 604 ProviderSuccessCallback successCallback, | 609 ProviderSuccessCallback successCallback, |
| 605 ProviderErrorCallback errorCallback); | 610 ProviderErrorCallback errorCallback); |
| 606 }; | 611 }; |
| 607 }; | 612 }; |
| 608 | 613 |
| OLD | NEW |