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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Represents a mounted file system. | 60 // Represents a mounted file system. |
61 dictionary FileSystemInfo { | 61 dictionary FileSystemInfo { |
62 // The identifier of the file system. | 62 // The identifier of the file system. |
63 DOMString fileSystemId; | 63 DOMString fileSystemId; |
64 | 64 |
65 // A human-readable name for the file system. | 65 // A human-readable name for the file system. |
66 DOMString displayName; | 66 DOMString displayName; |
67 | 67 |
68 // Whether the file system supports operations which may change contents | 68 // Whether the file system supports operations which may change contents |
69 // of the file system (such as creating, deleting or writing to files). | 69 // of the file system (such as creating, deleting or writing to files). |
70 [nodoc] boolean writable; | 70 boolean writable; |
71 }; | 71 }; |
72 | 72 |
73 // Options for the <code>mount()</code> method. | 73 // Options for the <code>mount()</code> method. |
74 dictionary MountOptions { | 74 dictionary MountOptions { |
75 // The string indentifier of the file system. Must be unique per each | 75 // The string indentifier of the file system. Must be unique per each |
76 // extension. | 76 // extension. |
77 DOMString fileSystemId; | 77 DOMString fileSystemId; |
78 | 78 |
79 // A human-readable name for the file system. | 79 // A human-readable name for the file system. |
80 DOMString displayName; | 80 DOMString displayName; |
81 | 81 |
82 // Whether the file system supports operations which may change contents | 82 // Whether the file system supports operations which may change contents |
83 // of the file system (such as creating, deleting or writing to files). | 83 // of the file system (such as creating, deleting or writing to files). |
84 [nodoc] boolean? writable; | 84 boolean? writable; |
85 }; | 85 }; |
86 | 86 |
87 // Options for the <code>unmount()</code> method. | 87 // Options for the <code>unmount()</code> method. |
88 dictionary UnmountOptions { | 88 dictionary UnmountOptions { |
89 // The identifier of the file system to be unmounted. | 89 // The identifier of the file system to be unmounted. |
90 DOMString fileSystemId; | 90 DOMString fileSystemId; |
91 }; | 91 }; |
92 | 92 |
93 // Options for the <code>onUnmountRequested()</code> event. | 93 // Options for the <code>onUnmountRequested()</code> event. |
94 dictionary UnmountRequestedOptions { | 94 dictionary UnmountRequestedOptions { |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 // an error, <code>errorCallback</code> must be called. | 402 // an error, <code>errorCallback</code> must be called. |
403 [maxListeners=1] static void onReadFileRequested( | 403 [maxListeners=1] static void onReadFileRequested( |
404 ReadFileRequestedOptions options, | 404 ReadFileRequestedOptions options, |
405 FileDataCallback successCallback, | 405 FileDataCallback successCallback, |
406 ProviderErrorCallback errorCallback); | 406 ProviderErrorCallback errorCallback); |
407 | 407 |
408 // Raised when creating a directory is requested. The operation must fail | 408 // Raised when creating a directory is requested. The operation must fail |
409 // with the EXISTS error if the target directory already exists. | 409 // with the EXISTS error if the target directory already exists. |
410 // If <code>recursive</code> is true, then all of the missing directories | 410 // If <code>recursive</code> is true, then all of the missing directories |
411 // on the directory path must be created. | 411 // on the directory path must be created. |
412 [maxListeners=1, nodoc] static void onCreateDirectoryRequested( | 412 [maxListeners=1] static void onCreateDirectoryRequested( |
413 CreateDirectoryRequestedOptions options, | 413 CreateDirectoryRequestedOptions options, |
414 ProviderSuccessCallback successCallback, | 414 ProviderSuccessCallback successCallback, |
415 ProviderErrorCallback errorCallback); | 415 ProviderErrorCallback errorCallback); |
416 | 416 |
417 // Raised when deleting an entry is requested. If <code>recursive</code> is | 417 // Raised when deleting an entry is requested. If <code>recursive</code> is |
418 // true, and the entry is a directory, then all of the entries inside | 418 // true, and the entry is a directory, then all of the entries inside |
419 // must be recursively deleted as well. | 419 // must be recursively deleted as well. |
420 [maxListeners=1, nodoc] static void onDeleteEntryRequested( | 420 [maxListeners=1] static void onDeleteEntryRequested( |
421 DeleteEntryRequestedOptions options, | 421 DeleteEntryRequestedOptions options, |
422 ProviderSuccessCallback successCallback, | 422 ProviderSuccessCallback successCallback, |
423 ProviderErrorCallback errorCallback); | 423 ProviderErrorCallback errorCallback); |
424 | 424 |
425 // Raised when creating a file is requested. If the file already exists, | 425 // Raised when creating a file is requested. If the file already exists, |
426 // then <code>errorCallback</code> must be called with the <code>EXISTS | 426 // then <code>errorCallback</code> must be called with the <code>EXISTS |
427 // </code> error code. | 427 // </code> error code. |
428 [maxListeners=1, nodoc] static void onCreateFileRequested( | 428 [maxListeners=1] static void onCreateFileRequested( |
429 CreateFileRequestedOptions options, | 429 CreateFileRequestedOptions options, |
430 ProviderSuccessCallback successCallback, | 430 ProviderSuccessCallback successCallback, |
431 ProviderErrorCallback errorCallback); | 431 ProviderErrorCallback errorCallback); |
432 | 432 |
433 // Raised when copying an entry (recursively if a directory) is requested. | 433 // Raised when copying an entry (recursively if a directory) is requested. |
434 // If an error occurs, then <code>errorCallback</code> must be called. | 434 // If an error occurs, then <code>errorCallback</code> must be called. |
435 [maxListeners=1, nodoc] static void onCopyEntryRequested( | 435 [maxListeners=1] static void onCopyEntryRequested( |
436 CopyEntryRequestedOptions options, | 436 CopyEntryRequestedOptions options, |
437 ProviderSuccessCallback successCallback, | 437 ProviderSuccessCallback successCallback, |
438 ProviderErrorCallback errorCallback); | 438 ProviderErrorCallback errorCallback); |
439 | 439 |
440 // Raised when moving an entry (recursively if a directory) is requested. | 440 // Raised when moving an entry (recursively if a directory) is requested. |
441 // If an error occurs, then <code>errorCallback</code> must be called. | 441 // If an error occurs, then <code>errorCallback</code> must be called. |
442 [maxListeners=1, nodoc] static void onMoveEntryRequested( | 442 [maxListeners=1] static void onMoveEntryRequested( |
443 MoveEntryRequestedOptions options, | 443 MoveEntryRequestedOptions options, |
444 ProviderSuccessCallback successCallback, | 444 ProviderSuccessCallback successCallback, |
445 ProviderErrorCallback errorCallback); | 445 ProviderErrorCallback errorCallback); |
446 | 446 |
447 // Raised when truncating a file to a desired length is requested. | 447 // Raised when truncating a file to a desired length is requested. |
448 // If an error occurs, then <code>errorCallback</code> must be called. | 448 // If an error occurs, then <code>errorCallback</code> must be called. |
449 [maxListeners=1, nodoc] static void onTruncateRequested( | 449 [maxListeners=1] static void onTruncateRequested( |
450 TruncateRequestedOptions options, | 450 TruncateRequestedOptions options, |
451 ProviderSuccessCallback successCallback, | 451 ProviderSuccessCallback successCallback, |
452 ProviderErrorCallback errorCallback); | 452 ProviderErrorCallback errorCallback); |
453 | 453 |
454 // Raised when writing contents to a file opened previously with <code> | 454 // Raised when writing contents to a file opened previously with <code> |
455 // openRequestId</code> is requested. | 455 // openRequestId</code> is requested. |
456 [maxListeners=1, nodoc] static void onWriteFileRequested( | 456 [maxListeners=1] static void onWriteFileRequested( |
457 WriteFileRequestedOptions options, | 457 WriteFileRequestedOptions options, |
458 ProviderSuccessCallback successCallback, | 458 ProviderSuccessCallback successCallback, |
459 ProviderErrorCallback errorCallback); | 459 ProviderErrorCallback errorCallback); |
460 | 460 |
461 // Raised when aborting an operation with <code>operationRequestId</code> | 461 // Raised when aborting an operation with <code>operationRequestId</code> |
462 // is requested. The operation executed with <code>operationRequestId</code> | 462 // is requested. The operation executed with <code>operationRequestId</code> |
463 // must be immediately stopped and <code>successCallback</code> of this | 463 // must be immediately stopped and <code>successCallback</code> of this |
464 // abort request executed. If aborting fails, then <code>errorCallback | 464 // abort request executed. If aborting fails, then <code>errorCallback |
465 // </code> must be called. Note, that callbacks of the aborted operation | 465 // </code> must be called. Note, that callbacks of the aborted operation |
466 // 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> |
467 // errorCallback</code>, the request may be forcibly aborted. | 467 // errorCallback</code>, the request may be forcibly aborted. |
468 [maxListeners=1, nodoc] static void onAbortRequested( | 468 [maxListeners=1] static void onAbortRequested( |
469 AbortRequestedOptions options, | 469 AbortRequestedOptions options, |
470 ProviderSuccessCallback successCallback, | 470 ProviderSuccessCallback successCallback, |
471 ProviderErrorCallback errorCallback); | 471 ProviderErrorCallback errorCallback); |
472 }; | 472 }; |
473 }; | 473 }; |
474 | 474 |
OLD | NEW |