Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: chrome/common/extensions/api/file_system_provider.idl

Issue 1088883002: Add events for configuring and adding new providers to FSP API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Options for the <code>unmount()</code> method. 164 // Options for the <code>unmount()</code> method.
165 dictionary UnmountOptions { 165 dictionary UnmountOptions {
166 // The identifier of the file system to be unmounted. 166 // The identifier of the file system to be unmounted.
167 DOMString fileSystemId; 167 DOMString fileSystemId;
168 }; 168 };
169 169
170 // Options for the <code>onUnmountRequested()</code> event. 170 // Options for the <code>onUnmountRequested()</code> event.
171 dictionary UnmountRequestedOptions { 171 dictionary UnmountRequestedOptions {
172 // The identifier of the file system to be unmounted. 172 // The identifier of the file system to be unmounted.
173 DOMString fileSystemId; 173 DOMString fileSystemId;
174
175 // The unique identifier of this request.
174 long requestId; 176 long requestId;
175 }; 177 };
176 178
177 // Options for the <code>onGetMetadataRequested()</code> event. 179 // Options for the <code>onGetMetadataRequested()</code> event.
178 dictionary GetMetadataRequestedOptions { 180 dictionary GetMetadataRequestedOptions {
179 // The identifier of the file system related to this operation. 181 // The identifier of the file system related to this operation.
180 DOMString fileSystemId; 182 DOMString fileSystemId;
181 183
182 // The unique identifier of this request. 184 // The unique identifier of this request.
183 long requestId; 185 long requestId;
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 // entry itself) 427 // entry itself)
426 Change[]? changes; 428 Change[]? changes;
427 429
428 // Tag for the notification. Required if the file system was mounted with 430 // Tag for the notification. Required if the file system was mounted with
429 // the <code>supportsNotifyTag</code> option. Note, that this flag is 431 // the <code>supportsNotifyTag</code> option. Note, that this flag is
430 // necessary to provide notifications about changes which changed even 432 // necessary to provide notifications about changes which changed even
431 // when the system was shutdown. 433 // when the system was shutdown.
432 DOMString? tag; 434 DOMString? tag;
433 }; 435 };
434 436
437 // Options for the <code>onConfigureRequested()</code> event.
438 dictionary ConfigureRequestedOptions {
439 // The identifier of the file system to be configured.
440 DOMString fileSystemId;
441
442 // The unique identifier of this request.
443 long requestId;
444 };
445
435 // Callback to receive the result of getAll() function. 446 // Callback to receive the result of getAll() function.
436 callback GetAllCallback = void(FileSystemInfo[] fileSystems); 447 callback GetAllCallback = void(FileSystemInfo[] fileSystems);
437 448
438 // Callback to receive the result of get() function. 449 // Callback to receive the result of get() function.
439 callback GetCallback = void(FileSystemInfo fileSystem); 450 callback GetCallback = void(FileSystemInfo fileSystem);
440 451
441 // Callback to be called by the providing extension in case of a success. 452 // Callback to be called by the providing extension in case of a success.
442 [nocompile] callback ProviderSuccessCallback = void(); 453 [nocompile] callback ProviderSuccessCallback = void();
443 454
444 // Callback to be called by the providing extension in case of an error. 455 // Callback to be called by the providing extension in case of an error.
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 // must be immediately stopped and <code>successCallback</code> of this 651 // must be immediately stopped and <code>successCallback</code> of this
641 // abort request executed. If aborting fails, then <code>errorCallback 652 // abort request executed. If aborting fails, then <code>errorCallback
642 // </code> must be called. Note, that callbacks of the aborted operation 653 // </code> must be called. Note, that callbacks of the aborted operation
643 // must not be called, as they will be ignored. Despite calling <code> 654 // must not be called, as they will be ignored. Despite calling <code>
644 // errorCallback</code>, the request may be forcibly aborted. 655 // errorCallback</code>, the request may be forcibly aborted.
645 [maxListeners=1] static void onAbortRequested( 656 [maxListeners=1] static void onAbortRequested(
646 AbortRequestedOptions options, 657 AbortRequestedOptions options,
647 ProviderSuccessCallback successCallback, 658 ProviderSuccessCallback successCallback,
648 ProviderErrorCallback errorCallback); 659 ProviderErrorCallback errorCallback);
649 660
661 // Raised when showing a configuration dialog for <code>fileSystemId</code>
662 // is requested. If it's not supported, then this event must not be handled.
663 [maxListeners=1] static void onConfigureRequested(
benwells 2015/04/16 00:29:35 Should this be nodoc until the implementation is r
mtomasz 2015/04/16 01:07:28 This is going to be shipped in M44. I can add [nod
benwells 2015/04/16 01:15:32 Having documentation for new things that work is f
mtomasz 2015/04/16 01:24:16 Makes sense. I reverted the documentation and adde
664 ConfigureRequestedOptions options,
665 ProviderSuccessCallback successCallback,
666 ProviderErrorCallback errorCallback);
667
668 // Raised when showing a dialog for mounting a new file system is requested.
669 // If the extension/app is a file handler, then this event shouldn't be
670 // handled. Instead <code>onLaunched</code> should be handled in order to
671 // mount new file systems when a file is opened.
672 [maxListeners=1] static void onMountRequested(
673 ProviderSuccessCallback successCallback,
benwells 2015/04/16 00:29:36 What about options? I'd have thought providing opt
mtomasz 2015/04/16 01:07:28 It's responsibility of the providing extension to
674 ProviderErrorCallback errorCallback);
675
650 // Raised when setting a new directory watcher is requested. If an error 676 // Raised when setting a new directory watcher is requested. If an error
651 // occurs, then <code>errorCallback</code> must be called. 677 // occurs, then <code>errorCallback</code> must be called.
652 [maxListeners=1, nodoc] static void onAddWatcherRequested( 678 [maxListeners=1, nodoc] static void onAddWatcherRequested(
653 AddWatcherRequestedOptions options, 679 AddWatcherRequestedOptions options,
654 ProviderSuccessCallback successCallback, 680 ProviderSuccessCallback successCallback,
655 ProviderErrorCallback errorCallback); 681 ProviderErrorCallback errorCallback);
656 682
657 // Raised when the watcher should be removed. If an error occurs, then 683 // Raised when the watcher should be removed. If an error occurs, then
658 // <code>errorCallback</code> must be called. 684 // <code>errorCallback</code> must be called.
659 [maxListeners=1, nodoc] static void onRemoveWatcherRequested( 685 [maxListeners=1, nodoc] static void onRemoveWatcherRequested(
660 RemoveWatcherRequestedOptions options, 686 RemoveWatcherRequestedOptions options,
661 ProviderSuccessCallback successCallback, 687 ProviderSuccessCallback successCallback,
662 ProviderErrorCallback errorCallback); 688 ProviderErrorCallback errorCallback);
663 }; 689 };
664 }; 690 };
665 691
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698