| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 // Callback to receive the result of unmount() function. | 293 // Callback to receive the result of unmount() function. |
| 294 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); | 294 callback UnmountCallback = void([nodoc, instanceOf=DOMError] object error); |
| 295 | 295 |
| 296 // Callback to receive the result of getAll() function. | 296 // Callback to receive the result of getAll() function. |
| 297 callback GetAllCallback = void(FileSystemInfo[] fileSystems); | 297 callback GetAllCallback = void(FileSystemInfo[] fileSystems); |
| 298 | 298 |
| 299 // Callback to handle an error raised from the browser. | 299 // Callback to handle an error raised from the browser. |
| 300 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); | 300 [nocompile] callback ErrorCallback = void([instanceOf=DOMError] object error); |
| 301 | 301 |
| 302 // Callback to be called by the providing extension in case of a success. | 302 // Callback to be called by the providing extension in case of a success. |
| 303 callback ProviderSuccessCallback = void(); | 303 [nocompile] callback ProviderSuccessCallback = void(); |
| 304 | 304 |
| 305 // Callback to be called by the providing extension in case of an error. | 305 // Callback to be called by the providing extension in case of an error. |
| 306 callback ProviderErrorCallback = void(ProviderError error); | 306 [nocompile] callback ProviderErrorCallback = void(ProviderError error); |
| 307 | 307 |
| 308 // Success callback for the <code>onGetMetadataRequested</code> event. | 308 // Success callback for the <code>onGetMetadataRequested</code> event. |
| 309 callback MetadataCallback = void(EntryMetadata metadata); | 309 [nocompile] callback MetadataCallback = void( |
| 310 EntryMetadata metadata); |
| 310 | 311 |
| 311 // Success callback for the <code>onReadDirectoryRequested</code> event. If | 312 // Success callback for the <code>onReadDirectoryRequested</code> event. If |
| 312 // more entries will be returned, then <code>hasMore</code> must be true, and | 313 // more entries will be returned, then <code>hasMore</code> must be true, and |
| 313 // it has to be called again with additional entries. If no more entries are | 314 // it has to be called again with additional entries. If no more entries are |
| 314 // available, then <code>hasMore</code> must be set to false. | 315 // available, then <code>hasMore</code> must be set to false. |
| 315 callback EntriesCallback = void(EntryMetadata[] entries, boolean hasMore); | 316 [nocompile] callback EntriesCallback = void( |
| 317 EntryMetadata[] entries, boolean hasMore); |
| 316 | 318 |
| 317 // Success callback for the <code>onReadFileRequested</code> event. If more | 319 // Success callback for the <code>onReadFileRequested</code> event. If more |
| 318 // data will be returned, then <code>hasMore</code> must be true, and it | 320 // data will be returned, then <code>hasMore</code> must be true, and it |
| 319 // has to be called again with additional entries. If no more data is | 321 // has to be called again with additional entries. If no more data is |
| 320 // available, then <code>hasMore</code> must be set to false. | 322 // available, then <code>hasMore</code> must be set to false. |
| 321 callback FileDataCallback = void(ArrayBuffer data, boolean hasMore); | 323 [nocompile] callback FileDataCallback = void( |
| 324 ArrayBuffer data, boolean hasMore); |
| 322 | 325 |
| 323 interface Functions { | 326 interface Functions { |
| 324 // Mounts a file system with the given <code>fileSystemId</code> and <code> | 327 // Mounts a file system with the given <code>fileSystemId</code> and <code> |
| 325 // displayName</code>. <code>displayName</code> will be shown in the left | 328 // displayName</code>. <code>displayName</code> will be shown in the left |
| 326 // panel of Files.app. <code>displayName</code> can contain any characters | 329 // panel of Files.app. <code>displayName</code> can contain any characters |
| 327 // including '/', but cannot be an empty string. <code>displayName</code> | 330 // including '/', but cannot be an empty string. <code>displayName</code> |
| 328 // must be descriptive but doesn't have to be unique. Duplicate display | 331 // must be descriptive but doesn't have to be unique. Duplicate display |
| 329 // names are uniquified by adding suffix like "(1)" in the Files app UI. | 332 // names are uniquified by adding suffix like "(1)" in the Files app UI. |
| 330 // | 333 // |
| 331 // If a file system with the passed <code>fileSystemId</code> is already | 334 // If a file system with the passed <code>fileSystemId</code> is already |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 // </code> must be called. Note, that callbacks of the aborted operation | 465 // </code> must be called. Note, that callbacks of the aborted operation |
| 463 // must not be called, as they will be ignored. Despite calling <code> | 466 // must not be called, as they will be ignored. Despite calling <code> |
| 464 // errorCallback</code>, the request may be forcibly aborted. | 467 // errorCallback</code>, the request may be forcibly aborted. |
| 465 [maxListeners=1, nodoc] static void onAbortRequested( | 468 [maxListeners=1, nodoc] static void onAbortRequested( |
| 466 AbortRequestedOptions options, | 469 AbortRequestedOptions options, |
| 467 ProviderSuccessCallback successCallback, | 470 ProviderSuccessCallback successCallback, |
| 468 ProviderErrorCallback errorCallback); | 471 ProviderErrorCallback errorCallback); |
| 469 }; | 472 }; |
| 470 }; | 473 }; |
| 471 | 474 |
| OLD | NEW |