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

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

Issue 1077823005: Declare providing extension capabilities in the manifest. (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 23 matching lines...) Expand all
34 READ, 34 READ,
35 WRITE 35 WRITE
36 }; 36 };
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 data for provided file systems. Used in manifest files of
45 enum FileSystemSource { 45 // providing extensions.
46 // The file system is handling a file, eg. an archive file obtained via the 46 enum Source {
47 // File systems are handling files, eg. an archive file obtained via the
47 // <code>onLaunched</code> event and the <code>file_handlers</code> manifest 48 // <code>onLaunched</code> event and the <code>file_handlers</code> manifest
48 // entry. 49 // entry.
49 FILE, 50 file,
50 51
51 // The file system contents are fetched from an external device, such as a 52 // File systems' contents are fetched from an external device, such as a
52 // USB device, but not via <code>file_handlers</code>. 53 // USB device, but not via <code>file_handlers</code>.
53 DEVICE, 54 device,
54 55
55 // The file system is network based. The contents are obtained from another 56 // File systems are network based. The contents are obtained from another
56 // server or local network. Eg. cloud services. 57 // server or local network. Eg. cloud services.
57 NETWORK 58 network
59 };
60
61 // Represents capabilities of a providing extension. Used in manifest files of
62 // providing extensions.
63 dictionary Capabilities {
64 // Whether configuring via <code>onConfigureRequested</code> is supported.
65 boolean configurable;
66
67 // Whether multiple (more than one) mounted file systems are supported.
68 boolean multiple_mounts;
not at google - send to devlin 2015/04/23 23:16:35 multipleMounts would be more consistent.
mtomasz 2015/04/24 12:16:11 In manifest we always use underscored_keys. So we
not at google - send to devlin 2015/04/24 16:18:32 There are plenty of counterexamples to this rule,
mtomasz 2015/04/24 17:12:10 Well, this is exactly what I'm doing. This diction
69
70 // Source of data for all mounted file systems.
71 Source source;
not at google - send to devlin 2015/04/23 23:16:35 This is now required; was that an intentional chan
mtomasz 2015/04/24 12:16:11 I found the "OTHER" an overkill. Instead I decided
58 }; 72 };
59 73
60 // Represents metadata of a file or a directory. 74 // Represents metadata of a file or a directory.
61 dictionary EntryMetadata { 75 dictionary EntryMetadata {
62 // True if it is a directory. 76 // True if it is a directory.
63 boolean isDirectory; 77 boolean isDirectory;
64 78
65 // Name of this entry (not full path name). Must not contain '/'. For root 79 // Name of this entry (not full path name). Must not contain '/'. For root
66 // it must be empty. 80 // it must be empty.
67 DOMString name; 81 DOMString name;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // of the file system (such as creating, deleting or writing to files). 132 // of the file system (such as creating, deleting or writing to files).
119 boolean writable; 133 boolean writable;
120 134
121 // The maximum number of files that can be opened at once. If 0, then not 135 // The maximum number of files that can be opened at once. If 0, then not
122 // limited. 136 // limited.
123 long openedFilesLimit; 137 long openedFilesLimit;
124 138
125 // List of currently opened files. 139 // List of currently opened files.
126 OpenedFile[] openedFiles; 140 OpenedFile[] openedFiles;
127 141
128 // Source of the file system data.
129 FileSystemSource? source;
130
131 // Whether the file system supports the <code>tag</code> field for observing 142 // Whether the file system supports the <code>tag</code> field for observing
132 // directories. 143 // directories.
133 [nodoc] boolean? supportsNotifyTag; 144 [nodoc] boolean? supportsNotifyTag;
134 145
135 // List of watchers. 146 // List of watchers.
136 [nodoc] Watcher[] watchers; 147 [nodoc] Watcher[] watchers;
137 }; 148 };
138 149
139 // Options for the <code>mount()</code> method. 150 // Options for the <code>mount()</code> method.
140 dictionary MountOptions { 151 dictionary MountOptions {
141 // The string indentifier of the file system. Must be unique per each 152 // The string indentifier of the file system. Must be unique per each
142 // extension. 153 // extension.
143 DOMString fileSystemId; 154 DOMString fileSystemId;
144 155
145 // A human-readable name for the file system. 156 // A human-readable name for the file system.
146 DOMString displayName; 157 DOMString displayName;
147 158
148 // Whether the file system supports operations which may change contents 159 // Whether the file system supports operations which may change contents
149 // of the file system (such as creating, deleting or writing to files). 160 // of the file system (such as creating, deleting or writing to files).
150 boolean? writable; 161 boolean? writable;
151 162
152 // The maximum number of files that can be opened at once. If not specified, 163 // The maximum number of files that can be opened at once. If not specified,
153 // or 0, then not limited. 164 // or 0, then not limited.
154 long? openedFilesLimit; 165 long? openedFilesLimit;
155 166
156 // Source of the file system data.
157 FileSystemSource? source;
158
159 // Whether the file system supports the <code>tag</code> field for observed 167 // Whether the file system supports the <code>tag</code> field for observed
160 // directories. Required in order to enable the internal cache. 168 // directories. Required in order to enable the internal cache.
161 [nodoc] boolean? supportsNotifyTag; 169 [nodoc] boolean? supportsNotifyTag;
162 }; 170 };
163 171
164 // Options for the <code>unmount()</code> method. 172 // Options for the <code>unmount()</code> method.
165 dictionary UnmountOptions { 173 dictionary UnmountOptions {
166 // The identifier of the file system to be unmounted. 174 // The identifier of the file system to be unmounted.
167 DOMString fileSystemId; 175 DOMString fileSystemId;
168 }; 176 };
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 690
683 // Raised when the watcher should be removed. If an error occurs, then 691 // Raised when the watcher should be removed. If an error occurs, then
684 // <code>errorCallback</code> must be called. 692 // <code>errorCallback</code> must be called.
685 [maxListeners=1, nodoc] static void onRemoveWatcherRequested( 693 [maxListeners=1, nodoc] static void onRemoveWatcherRequested(
686 RemoveWatcherRequestedOptions options, 694 RemoveWatcherRequestedOptions options,
687 ProviderSuccessCallback successCallback, 695 ProviderSuccessCallback successCallback,
688 ProviderErrorCallback errorCallback); 696 ProviderErrorCallback errorCallback);
689 }; 697 };
690 }; 698 };
691 699
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698