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

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

Issue 989813002: [Extensions] Make a chrome.developerPrivate.getExtensionsInfo function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // developerPrivate API. 5 // developerPrivate API.
6 // This is a private API exposing developing and debugging functionalities for 6 // This is a private API exposing developing and debugging functionalities for
7 // apps and extensions. 7 // apps and extensions.
8 namespace developerPrivate { 8 namespace developerPrivate {
9 9
10 // DEPRECATED: Prefer ExtensionType.
10 enum ItemType { 11 enum ItemType {
11 hosted_app, 12 hosted_app,
12 packaged_app, 13 packaged_app,
13 legacy_packaged_app, 14 legacy_packaged_app,
14 extension, 15 extension,
15 theme 16 theme
16 }; 17 };
17 18
19 // DEPRECATED: Prefer ExtensionView.
18 dictionary ItemInspectView { 20 dictionary ItemInspectView {
19 // path to the inspect page. 21 // path to the inspect page.
20 DOMString path; 22 DOMString path;
21 23
22 // For lazy background pages, the value is -1. 24 // For lazy background pages, the value is -1.
23 long render_process_id; 25 long render_process_id;
24 26
25 long render_view_id; 27 long render_view_id;
26 boolean incognito; 28 boolean incognito;
27 boolean generatedBackgroundPage; 29 boolean generatedBackgroundPage;
28 }; 30 };
29 31
30 dictionary InstallWarning { 32 dictionary InstallWarning {
31 DOMString message; 33 DOMString message;
32 }; 34 };
33 35
36 enum ExtensionType {
37 HOSTED_APP,
38 PLATFORM_APP,
39 LEGACY_PACKAGED_APP,
40 EXTENSION,
41 THEME,
42 SHARED_MODULE
43 };
44
45 enum RunStateValue {
Devlin 2015/03/07 06:16:43 On second thought, I may change this into a dictio
not at google - send to devlin 2015/03/09 18:44:01 Yes this enum doesn't make sense to me.
46 CANT_HAVE_STATE,
47 WANTS_STATE,
48 HAS_STATE
49 };
50
51 enum Location {
52 FROM_STORE,
53 UNPACKED,
54 UNKNOWN
not at google - send to devlin 2015/03/09 18:44:01 there is also local CRX's (like drag-drop into chr
Devlin 2015/03/09 19:28:20 Hmm... good point. Though if we match this up wit
55 };
56
57 enum ErrorType {
58 MANIFEST,
59 RUNTIME
60 };
61
62 enum ErrorSeverity {
63 LOG,
64 WARNING,
65 ERROR
66 };
67
68 enum ExtensionState {
69 ENABLED,
70 DISABLED,
71 TERMINATED
72 };
73
74 dictionary StackFrame {
75 long lineNumber;
76 long columnNumber;
77 DOMString source;
78 DOMString function;
not at google - send to devlin 2015/03/09 18:44:01 You might have a problem with calling something "f
Devlin 2015/03/09 19:28:20 There's no problem having a "function" property on
79 };
80
81 dictionary ManifestError {
82 ErrorType type;
83 DOMString extensionId;
84 boolean fromIncognito;
85 DOMString source;
86 DOMString message;
87 DOMString manifestKey;
88 DOMString? manifestSpecific;
89 };
90
91 dictionary RuntimeError {
not at google - send to devlin 2015/03/09 18:44:01 This shares a lot with ManifestError, you could ha
Devlin 2015/03/09 19:28:20 But (our) IDL doesn't have inheritance, and, of co
not at google - send to devlin 2015/03/09 21:11:39 I mean: dictionary ErrorBase { ErrorType type;
92 ErrorType type;
93 DOMString extension_id;
94 boolean fromIncognito;
95 DOMString source;
96 DOMString message;
97 long occurrences;
98 long renderViewId;
99 long renderProcessId;
100 boolean canInspect;
101 StackFrame[] stackTrace;
102 };
103
104 dictionary DisableReasons {
105 boolean suspiciousInstall;
106 boolean corruptInstall;
107 boolean updateRequired;
108 };
109
110 dictionary OptionsPage {
111 boolean openInTab;
112 DOMString url;
113 };
114
115 dictionary HomePage {
116 DOMString url;
117 boolean specified;
118 };
119
120 dictionary ExtensionView {
121 DOMString path;
122 long renderProcessId;
123 long renderViewId;
124 boolean incognito;
125 boolean generatedBackgroundPage;
126 };
127
128 dictionary ExtensionInfo {
129 boolean actionButtonHidden; // enable_show_button
Devlin 2015/03/07 03:21:03 The chickenscratch comments map to the names in ex
130 DOMString? blacklistText;
131 DOMString[] dependentExtensions;
132 DOMString description;
133 DisableReasons disableReasons; //suspicious, corrupt, updaterequired
not at google - send to devlin 2015/03/09 18:44:01 space after //
Devlin 2015/03/09 19:28:20 Chickenscratch will be removed. :P Only left it i
134 RunStateValue errorCollection; // errorCollectionEd, wantsErrorCollection;
135 RunStateValue fileAccess; // allowFileAccess, wantsFileAccess
136 HomePage homePage; // homepageProvided && homepageUrl
137 DOMString iconUrl; // icon
138 DOMString id;
139 RunStateValue incognitoAccess; // enabled/can be enabled incognito
140 boolean installedByCustodian;
141 DOMString[] installWarnings;
142 DOMString? launchUrl;
143 Location location; // is_unpacked, is from store, allow reload
not at google - send to devlin 2015/03/09 18:44:01 is from store --> is_from_store --> etc.
Devlin 2015/03/09 19:28:20 Ditto.
144 DOMString? locationText;
145 ManifestError[] manifestErrors;
146 boolean mustRemainInstalled; // recommendedInstall
147 DOMString name;
148 boolean offlineEnabled;
149 OptionsPage? optionsPage;
150 DOMString? path;
151 DOMString? policyText;
152 DOMString? prettifiedPath;
153 RunStateValue runOnAllUrls; // allowAllUrls, showAllUrls
154 RuntimeError[] runtimeErrors;
155 DOMString[] runtimeWarnings; // warnings
156 ExtensionState state;
157 ExtensionType type; // is_hosted_app, is_platform_app, etc
158 DOMString updateUrl;
159 boolean userMayModify; // managed install
160 DOMString version;
161 ExtensionView[] views;
162 };
163
164 // DEPRECATED: Prefer ExtensionInfo.
34 dictionary ItemInfo { 165 dictionary ItemInfo {
35 DOMString id; 166 DOMString id;
36 DOMString name; 167 DOMString name;
37 DOMString version; 168 DOMString version;
38 DOMString description; 169 DOMString description;
39 boolean may_disable; 170 boolean may_disable;
40 boolean enabled; 171 boolean enabled;
41 DOMString? disabled_reason; 172 DOMString? disabled_reason;
42 boolean isApp; 173 boolean isApp;
43 ItemType type; 174 ItemType type;
44 boolean allow_activity; 175 boolean allow_activity;
45 boolean allow_file_access; 176 boolean allow_file_access;
46 boolean wants_file_access; 177 boolean wants_file_access;
47 boolean incognito_enabled; 178 boolean incognito_enabled;
48 boolean is_unpacked; 179 boolean is_unpacked;
49 boolean allow_reload; 180 boolean allow_reload;
50 boolean terminated; 181 boolean terminated;
51 boolean allow_incognito; 182 boolean allow_incognito;
52 DOMString icon_url; 183 DOMString icon_url;
53 184
54 // Path of an unpacked extension. 185 // Path of an unpacked extension.
55 DOMString? path; 186 DOMString? path;
56 187
57 // Options settings page for the item. 188 // Options settings page for the item.
58 DOMString? options_url; 189 DOMString? options_url;
59 DOMString? app_launch_url; 190 DOMString? app_launch_url;
60 DOMString? homepage_url; 191 DOMString? homepage_url;
61 DOMString? update_url; 192 DOMString? update_url;
62 InstallWarning[] install_warnings; 193 InstallWarning[] install_warnings;
63 any[] manifest_errors; 194 ManifestError[] manifest_errors;
64 any[] runtime_errors; 195 RuntimeError[] runtime_errors;
65 boolean offline_enabled; 196 boolean offline_enabled;
66 197
67 // All views of the current extension. 198 // All views of the current extension.
68 ItemInspectView[] views; 199 ItemInspectView[] views;
69 }; 200 };
70 201
202 dictionary GetExtensionsInfoOptions {
203 boolean? includeDisabled;
204 boolean? includeTerminated;
205 };
206
71 dictionary InspectOptions { 207 dictionary InspectOptions {
72 DOMString extension_id; 208 DOMString extension_id;
73 DOMString render_process_id; 209 DOMString render_process_id;
74 DOMString render_view_id; 210 DOMString render_view_id;
75 boolean incognito; 211 boolean incognito;
76 }; 212 };
77 213
78 dictionary ReloadOptions { 214 dictionary ReloadOptions {
79 // If false, an alert dialog will show in the event of a reload error. 215 // If false, an alert dialog will show in the event of a reload error.
80 // Defaults to false. 216 // Defaults to false.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 328
193 // The line to focus the devtools at. 329 // The line to focus the devtools at.
194 long? lineNumber; 330 long? lineNumber;
195 331
196 // The column to focus the devtools at. 332 // The column to focus the devtools at.
197 long? columnNumber; 333 long? columnNumber;
198 }; 334 };
199 335
200 callback VoidCallback = void (); 336 callback VoidCallback = void ();
201 callback BooleanCallback = void (boolean result); 337 callback BooleanCallback = void (boolean result);
338 callback ExtensionInfosCallback = void (ExtensionInfo[] result);
339 callback ExtensionInfoCallback = void (ExtensionInfo result);
202 callback ItemsInfoCallback = void (ItemInfo[] result); 340 callback ItemsInfoCallback = void (ItemInfo[] result);
203 callback GetProjectsInfoCallback = void (ProjectInfo[] result); 341 callback GetProjectsInfoCallback = void (ProjectInfo[] result);
204 callback PathCallback = void (DOMString path); 342 callback PathCallback = void (DOMString path);
205 callback PackCallback = void (PackDirectoryResponse response); 343 callback PackCallback = void (PackDirectoryResponse response);
206 callback VoidCallback = void(); 344 callback VoidCallback = void();
207 callback RequestFileSourceCallback = 345 callback RequestFileSourceCallback =
208 void (RequestFileSourceResponse response); 346 void (RequestFileSourceResponse response);
209 347
210 interface Functions { 348 interface Functions {
211 // Runs auto update for extensions and apps immediately. 349 // Runs auto update for extensions and apps immediately.
212 // |callback| : Called with the boolean result, true if autoUpdate is 350 // |callback| : Called with the boolean result, true if autoUpdate is
213 // successful. 351 // successful.
214 static void autoUpdate(optional BooleanCallback callback); 352 static void autoUpdate(optional BooleanCallback callback);
215 353
216 // Returns information of all the extensions and apps installed. 354 // Returns information of all the extensions and apps installed.
355 // |options| : Options to restrict the items returned.
356 // |callback| : Called with extensions info.
357 static void getExtensionsInfo(optional GetExtensionsInfoOptions options,
358 ExtensionInfosCallback callback);
359
360 // Returns information of a particular extension.
361 // |id| : The id of the extension.
362 // |callback| : Called with the result.
363 static void getExtensionInfo(DOMString id,
364 ExtensionInfoCallback callback);
365
366 // Returns information of all the extensions and apps installed.
217 // |includeDisabled| : include disabled items. 367 // |includeDisabled| : include disabled items.
218 // |includeTerminated| : include terminated items. 368 // |includeTerminated| : include terminated items.
219 // |callback| : Called with items info. 369 // |callback| : Called with items info.
370 // DEPRECATED: Prefer getExtensionsInfo.
220 static void getItemsInfo(boolean includeDisabled, 371 static void getItemsInfo(boolean includeDisabled,
221 boolean includeTerminated, 372 boolean includeTerminated,
222 ItemsInfoCallback callback); 373 ItemsInfoCallback callback);
223 374
224 // Opens a permissions dialog. 375 // Opens a permissions dialog.
225 // |extensionId| : The id of the extension to show permissions for. 376 // |extensionId| : The id of the extension to show permissions for.
226 static void showPermissionsDialog(DOMString extensionId, 377 static void showPermissionsDialog(DOMString extensionId,
227 optional VoidCallback callback); 378 optional VoidCallback callback);
228 379
229 // Opens a developer tools inspection window. 380 // Opens a developer tools inspection window.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 // Open the developer tools to focus on a particular error. 444 // Open the developer tools to focus on a particular error.
294 static void openDevTools(OpenDevToolsProperties properties); 445 static void openDevTools(OpenDevToolsProperties properties);
295 }; 446 };
296 447
297 interface Events { 448 interface Events {
298 // Fired when a item state is changed. 449 // Fired when a item state is changed.
299 static void onItemStateChanged(EventData response); 450 static void onItemStateChanged(EventData response);
300 }; 451 };
301 452
302 }; 453 };
OLDNEW
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698