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 [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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 | 62 |
| 63 // Callback to be called by the providing extension in case of an error. | 63 // Callback to be called by the providing extension in case of an error. |
| 64 callback ProviderErrorCallback = void(ProviderError error); | 64 callback ProviderErrorCallback = void(ProviderError error); |
| 65 | 65 |
| 66 // Callback to handle an error raised from the browser. | 66 // Callback to handle an error raised from the browser. |
| 67 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); | 67 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); |
| 68 | 68 |
| 69 // Success callback for the <code>onGetMetadataRequested</code> event. | 69 // Success callback for the <code>onGetMetadataRequested</code> event. |
| 70 callback MetadataCallback = void(EntryMetadata metadata); | 70 callback MetadataCallback = void(EntryMetadata metadata); |
| 71 | 71 |
| 72 // Success callback for the <code>onDirectoryRequested</code> event. If more | |
| 73 // entries will be returned, then <code>hasNext</code> must be true, and it | |
| 74 // has to be called again with additional entries. If no more entries are | |
| 75 // available, then <code>hasNext</code> must be set to false. | |
| 76 callback EntriesCallback = void(ResourceEntry[] entries, bool hasNext); | |
| 77 | |
| 72 interface Functions { | 78 interface Functions { |
| 73 // Mounts a file system with the given <code>displayName</code>. | 79 // Mounts a file system with the given <code>displayName</code>. |
| 74 // <code>displayName</code> will be shown in the left panel of | 80 // <code>displayName</code> will be shown in the left panel of |
| 75 // Files.app. <code>displayName</code> can contain any characters | 81 // Files.app. <code>displayName</code> can contain any characters |
| 76 // including '/', but cannot be an empty string. <code>displayName</code> | 82 // including '/', but cannot be an empty string. <code>displayName</code> |
| 77 // should be descriptive but doesn't have to be unique. Duplicate display | 83 // should be descriptive but doesn't have to be unique. Duplicate display |
| 78 // names are uniquified by adding suffix like "(1)" in the Files.app UI. | 84 // names are uniquified by adding suffix like "(1)" in the Files.app UI. |
| 79 static void mount(DOMString displayName, | 85 static void mount(DOMString displayName, |
| 80 MountCallback successCallback, | 86 MountCallback successCallback, |
| 81 [nocompile] ErrorCallback errorCallback); | 87 [nocompile] ErrorCallback errorCallback); |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 104 | 110 |
| 105 // Raised when metadata of a file or a directory at <code>entryPath</code> | 111 // Raised when metadata of a file or a directory at <code>entryPath</code> |
| 106 // is requested. The metadata should be returned with the <code> | 112 // is requested. The metadata should be returned with the <code> |
| 107 // successCallback</code> call. In case of an error, <code>errorCallback | 113 // successCallback</code> call. In case of an error, <code>errorCallback |
| 108 // </code> must be called. | 114 // </code> must be called. |
| 109 [maxListeners=1] static void onGetMetadataRequested( | 115 [maxListeners=1] static void onGetMetadataRequested( |
| 110 long fileSystemId, | 116 long fileSystemId, |
| 111 DOMString entryPath, | 117 DOMString entryPath, |
| 112 MetadataCallback successCallback, | 118 MetadataCallback successCallback, |
| 113 ErrorCallback errorCallback); | 119 ErrorCallback errorCallback); |
| 120 | |
| 121 // Raised when contents of a directory at <code>directoryPath</code> is | |
|
benwells
2014/05/05 01:07:24
Grammar nit: should be "Raised when /the/ contents
mtomasz
2014/05/07 04:57:30
Done.
| |
| 122 // requested. Results should be returned in chunks by calling the <code> | |
| 123 // successCallback</code> several times. In case of an error, <code> | |
| 124 // errorCallback</code> must be called. | |
| 125 [maxListeners=1] static void onReadDirectoryRequested( | |
| 126 long fileSystemId, | |
| 127 DOMString directoryPath, | |
| 128 EntriesCallback successCallback, | |
| 129 ErrorCallback errorCallback); | |
| 114 }; | 130 }; |
| 115 }; | 131 }; |
| 116 | 132 |
| OLD | NEW |