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 26 matching lines...) Expand all Loading... | |
37 | 37 |
38 // Type of a change detected on the observed directory. | 38 // Type of a change detected on the observed directory. |
39 enum ChangeType { | 39 enum ChangeType { |
40 CHANGED, | 40 CHANGED, |
41 DELETED | 41 DELETED |
42 }; | 42 }; |
43 | 43 |
44 // Source of the file system data. | 44 // Source of the file system data. |
45 enum FileSystemSource { | 45 enum FileSystemSource { |
46 // The file system is handling a file, eg. an archive file obtained via the | 46 // The file system is handling a file, eg. an archive file obtained via the |
47 // <code>OnLaunched</code> event and the <code>file_handlers</code> manifest | 47 // <code>onLaunched</code> event and the <code>file_handlers</code> manifest |
48 // entry. | 48 // entry. |
49 FILE, | 49 FILE, |
50 | 50 |
51 // The file system contents are fetched from an external device, such as a | 51 // The file system contents are fetched from an external device, such as a |
52 // USB device, but not via <code>file_handlers</code>. | 52 // USB device, but not via <code>file_handlers</code>. |
53 DEVICE, | 53 DEVICE, |
54 | 54 |
55 // The file system is network based. The contents are obtained from another | 55 // The file system is network based. The contents are obtained from another |
56 // server or local network. Eg. cloud services. | 56 // server or local network. Eg. cloud services. |
57 NETWORK | 57 NETWORK |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
640 // must be immediately stopped and <code>successCallback</code> of this | 640 // must be immediately stopped and <code>successCallback</code> of this |
641 // abort request executed. If aborting fails, then <code>errorCallback | 641 // abort request executed. If aborting fails, then <code>errorCallback |
642 // </code> must be called. Note, that callbacks of the aborted operation | 642 // </code> must be called. Note, that callbacks of the aborted operation |
643 // must not be called, as they will be ignored. Despite calling <code> | 643 // must not be called, as they will be ignored. Despite calling <code> |
644 // errorCallback</code>, the request may be forcibly aborted. | 644 // errorCallback</code>, the request may be forcibly aborted. |
645 [maxListeners=1] static void onAbortRequested( | 645 [maxListeners=1] static void onAbortRequested( |
646 AbortRequestedOptions options, | 646 AbortRequestedOptions options, |
647 ProviderSuccessCallback successCallback, | 647 ProviderSuccessCallback successCallback, |
648 ProviderErrorCallback errorCallback); | 648 ProviderErrorCallback errorCallback); |
649 | 649 |
650 // Raised when showing a configuration dialog for <code>fileSystemId</code> | |
651 // is requested. If it's not supported, then this event must not be handled. | |
652 [maxListeners=1] static void onConfigureDialogRequested( | |
653 ConfigureRequestedOptions options, | |
benwells
2015/04/15 01:13:42
Where is ConfigureRequestedOptions defined?
mtomasz
2015/04/15 03:34:27
Sorry, I uploaded an incorrect patch. Done.
| |
654 ProviderSuccessCallback successCallback, | |
655 ProviderErrorCallback errorCallback); | |
656 | |
657 // Raised when showing a dialog for mounting a new file system is requested. | |
658 // If the extension/app is a file handler, then this event shouldn't be | |
659 // handled. Instead <code>onLaunched</code> should be handled in order to | |
660 // mount new file systems without showing an unnecessary UI. | |
661 [maxListeners=1] static void onAddDialogRequested( | |
662 ConfigureRequestedOptions options, | |
663 ProviderSuccessCallback successCallback, | |
664 ProviderErrorCallback errorCallback); | |
665 | |
650 // Raised when setting a new directory watcher is requested. If an error | 666 // Raised when setting a new directory watcher is requested. If an error |
651 // occurs, then <code>errorCallback</code> must be called. | 667 // occurs, then <code>errorCallback</code> must be called. |
652 [maxListeners=1, nodoc] static void onAddWatcherRequested( | 668 [maxListeners=1, nodoc] static void onAddWatcherRequested( |
653 AddWatcherRequestedOptions options, | 669 AddWatcherRequestedOptions options, |
654 ProviderSuccessCallback successCallback, | 670 ProviderSuccessCallback successCallback, |
655 ProviderErrorCallback errorCallback); | 671 ProviderErrorCallback errorCallback); |
656 | 672 |
657 // Raised when the watcher should be removed. If an error occurs, then | 673 // Raised when the watcher should be removed. If an error occurs, then |
658 // <code>errorCallback</code> must be called. | 674 // <code>errorCallback</code> must be called. |
659 [maxListeners=1, nodoc] static void onRemoveWatcherRequested( | 675 [maxListeners=1, nodoc] static void onRemoveWatcherRequested( |
660 RemoveWatcherRequestedOptions options, | 676 RemoveWatcherRequestedOptions options, |
661 ProviderSuccessCallback successCallback, | 677 ProviderSuccessCallback successCallback, |
662 ProviderErrorCallback errorCallback); | 678 ProviderErrorCallback errorCallback); |
663 }; | 679 }; |
664 }; | 680 }; |
665 | 681 |
OLD | NEW |