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

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 Location {
46 FROM_STORE,
47 UNPACKED,
48 THIRD_PARTY,
49 // "Unknown" includes crx's installed from chrome://extensions.
not at google - send to devlin 2015/03/11 17:43:05 Why not make it known then (even if whoever uses t
Devlin 2015/03/11 21:45:54 We don't have an easy way of knowing. We can alwa
50 UNKNOWN
51 };
52
53 enum ErrorType {
54 MANIFEST,
55 RUNTIME
56 };
57
58 enum ErrorSeverity {
59 LOG,
60 WARN,
61 ERROR
62 };
63
64 enum ExtensionState {
65 ENABLED,
66 DISABLED,
67 TERMINATED
68 };
69
70 dictionary AccessModifier {
71 boolean isEnabled;
72 boolean isActive;
73 };
74
75 dictionary StackFrame {
76 long lineNumber;
77 long columnNumber;
78 DOMString source;
79 DOMString function;
80 };
81
82 dictionary ErrorBase {
83 ErrorType type;
84 DOMString extensionId;
85 boolean fromIncognito;
86 DOMString source;
87 DOMString message;
88 };
89
90 dictionary ManifestError {
91 ErrorBase base;
92 DOMString manifestKey;
93 DOMString? manifestSpecific;
not at google - send to devlin 2015/03/11 17:43:05 What is this? I can't tell from just the name of t
Devlin 2015/03/11 21:45:54 It's the "specific" part of the manifest key that
94 };
95
96 dictionary RuntimeError {
97 ErrorBase base;
98 ErrorSeverity severity;
99 long occurrences;
100 long renderViewId;
101 long renderProcessId;
102 boolean canInspect;
103 StackFrame[] stackTrace;
104 };
105
106 dictionary DisableReasons {
107 boolean suspiciousInstall;
108 boolean corruptInstall;
109 boolean updateRequired;
110 };
111
112 dictionary OptionsPage {
113 boolean openInTab;
114 DOMString url;
115 };
116
117 dictionary HomePage {
118 DOMString url;
119 boolean specified;
120 };
121
122 dictionary ExtensionView {
123 DOMString path;
124 long renderProcessId;
125 long renderViewId;
126 boolean incognito;
127 boolean generatedBackgroundPage;
128 };
129
130 dictionary ExtensionInfo {
131 boolean actionButtonHidden; // enable_show_button
132 DOMString? blacklistText;
133 DOMString[] dependentExtensions;
134 DOMString description;
135 DisableReasons disableReasons; //suspicious, corrupt, updaterequired
136 AccessModifier errorCollection; // errorCollectionEd, wantsErrorCollection;
137 AccessModifier fileAccess; // allowFileAccess, wantsFileAccess
138 HomePage homePage; // homepageProvided && homepageUrl
139 DOMString iconUrl; // icon
140 DOMString id;
141 AccessModifier incognitoAccess; // enabled/can be enabled incognito
142 boolean installedByCustodian;
143 DOMString[] installWarnings;
144 DOMString? launchUrl;
145 Location location; // is_unpacked, is from store, allow reload
146 DOMString? locationText;
147 ManifestError[] manifestErrors;
148 boolean mustRemainInstalled; // recommendedInstall
149 DOMString name;
150 boolean offlineEnabled;
151 OptionsPage? optionsPage;
152 DOMString? path;
153 DOMString? policyText;
154 DOMString? prettifiedPath;
155 AccessModifier runOnAllUrls; // allowAllUrls, showAllUrls
156 RuntimeError[] runtimeErrors;
157 DOMString[] runtimeWarnings; // warnings
158 ExtensionState state;
159 ExtensionType type; // is_hosted_app, is_platform_app, etc
160 DOMString updateUrl;
161 boolean userMayModify; // managed install
162 DOMString version;
163 ExtensionView[] views;
164 };
165
166 // DEPRECATED: Prefer ExtensionInfo.
34 dictionary ItemInfo { 167 dictionary ItemInfo {
35 DOMString id; 168 DOMString id;
36 DOMString name; 169 DOMString name;
37 DOMString version; 170 DOMString version;
38 DOMString description; 171 DOMString description;
39 boolean may_disable; 172 boolean may_disable;
40 boolean enabled; 173 boolean enabled;
41 DOMString? disabled_reason; 174 DOMString? disabled_reason;
Devlin 2015/03/11 21:45:54 This is never set. Removing.
42 boolean isApp; 175 boolean isApp;
43 ItemType type; 176 ItemType type;
44 boolean allow_activity; 177 boolean allow_activity;
Devlin 2015/03/11 21:45:54 For posterity, note that this is never, and has ne
45 boolean allow_file_access; 178 boolean allow_file_access;
46 boolean wants_file_access; 179 boolean wants_file_access;
47 boolean incognito_enabled; 180 boolean incognito_enabled;
48 boolean is_unpacked; 181 boolean is_unpacked;
49 boolean allow_reload; 182 boolean allow_reload;
50 boolean terminated; 183 boolean terminated;
51 boolean allow_incognito; 184 boolean allow_incognito;
52 DOMString icon_url; 185 DOMString icon_url;
53 186
54 // Path of an unpacked extension. 187 // Path of an unpacked extension.
55 DOMString? path; 188 DOMString? path;
56 189
57 // Options settings page for the item. 190 // Options settings page for the item.
58 DOMString? options_url; 191 DOMString? options_url;
59 DOMString? app_launch_url; 192 DOMString? app_launch_url;
60 DOMString? homepage_url; 193 DOMString? homepage_url;
61 DOMString? update_url; 194 DOMString? update_url;
62 InstallWarning[] install_warnings; 195 InstallWarning[] install_warnings;
63 any[] manifest_errors; 196 ManifestError[] manifest_errors;
64 any[] runtime_errors; 197 RuntimeError[] runtime_errors;
65 boolean offline_enabled; 198 boolean offline_enabled;
66 199
67 // All views of the current extension. 200 // All views of the current extension.
68 ItemInspectView[] views; 201 ItemInspectView[] views;
69 }; 202 };
70 203
204 dictionary GetExtensionsInfoOptions {
205 boolean? includeDisabled;
206 boolean? includeTerminated;
207 };
208
71 dictionary InspectOptions { 209 dictionary InspectOptions {
72 DOMString extension_id; 210 DOMString extension_id;
73 DOMString render_process_id; 211 DOMString render_process_id;
74 DOMString render_view_id; 212 DOMString render_view_id;
75 boolean incognito; 213 boolean incognito;
76 }; 214 };
77 215
78 dictionary ReloadOptions { 216 dictionary ReloadOptions {
79 // If false, an alert dialog will show in the event of a reload error. 217 // If false, an alert dialog will show in the event of a reload error.
80 // Defaults to false. 218 // Defaults to false.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 330
193 // The line to focus the devtools at. 331 // The line to focus the devtools at.
194 long? lineNumber; 332 long? lineNumber;
195 333
196 // The column to focus the devtools at. 334 // The column to focus the devtools at.
197 long? columnNumber; 335 long? columnNumber;
198 }; 336 };
199 337
200 callback VoidCallback = void (); 338 callback VoidCallback = void ();
201 callback BooleanCallback = void (boolean result); 339 callback BooleanCallback = void (boolean result);
340 callback ExtensionInfosCallback = void (ExtensionInfo[] result);
341 callback ExtensionInfoCallback = void (ExtensionInfo result);
202 callback ItemsInfoCallback = void (ItemInfo[] result); 342 callback ItemsInfoCallback = void (ItemInfo[] result);
203 callback GetProjectsInfoCallback = void (ProjectInfo[] result); 343 callback GetProjectsInfoCallback = void (ProjectInfo[] result);
204 callback PathCallback = void (DOMString path); 344 callback PathCallback = void (DOMString path);
205 callback PackCallback = void (PackDirectoryResponse response); 345 callback PackCallback = void (PackDirectoryResponse response);
206 callback VoidCallback = void(); 346 callback VoidCallback = void();
207 callback RequestFileSourceCallback = 347 callback RequestFileSourceCallback =
208 void (RequestFileSourceResponse response); 348 void (RequestFileSourceResponse response);
209 349
210 interface Functions { 350 interface Functions {
211 // Runs auto update for extensions and apps immediately. 351 // Runs auto update for extensions and apps immediately.
212 // |callback| : Called with the boolean result, true if autoUpdate is 352 // |callback| : Called with the boolean result, true if autoUpdate is
213 // successful. 353 // successful.
214 static void autoUpdate(optional BooleanCallback callback); 354 static void autoUpdate(optional BooleanCallback callback);
215 355
216 // Returns information of all the extensions and apps installed. 356 // Returns information of all the extensions and apps installed.
357 // |options| : Options to restrict the items returned.
358 // |callback| : Called with extensions info.
359 static void getExtensionsInfo(optional GetExtensionsInfoOptions options,
360 ExtensionInfosCallback callback);
361
362 // Returns information of a particular extension.
363 // |id| : The id of the extension.
364 // |callback| : Called with the result.
365 static void getExtensionInfo(DOMString id,
366 ExtensionInfoCallback callback);
367
368 // Returns information of all the extensions and apps installed.
217 // |includeDisabled| : include disabled items. 369 // |includeDisabled| : include disabled items.
218 // |includeTerminated| : include terminated items. 370 // |includeTerminated| : include terminated items.
219 // |callback| : Called with items info. 371 // |callback| : Called with items info.
372 // DEPRECATED: Prefer getExtensionsInfo.
220 static void getItemsInfo(boolean includeDisabled, 373 static void getItemsInfo(boolean includeDisabled,
221 boolean includeTerminated, 374 boolean includeTerminated,
222 ItemsInfoCallback callback); 375 ItemsInfoCallback callback);
223 376
224 // Opens a permissions dialog. 377 // Opens a permissions dialog.
225 // |extensionId| : The id of the extension to show permissions for. 378 // |extensionId| : The id of the extension to show permissions for.
226 static void showPermissionsDialog(DOMString extensionId, 379 static void showPermissionsDialog(DOMString extensionId,
227 optional VoidCallback callback); 380 optional VoidCallback callback);
228 381
229 // Opens a developer tools inspection window. 382 // 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. 446 // Open the developer tools to focus on a particular error.
294 static void openDevTools(OpenDevToolsProperties properties); 447 static void openDevTools(OpenDevToolsProperties properties);
295 }; 448 };
296 449
297 interface Events { 450 interface Events {
298 // Fired when a item state is changed. 451 // Fired when a item state is changed.
299 static void onItemStateChanged(EventData response); 452 static void onItemStateChanged(EventData response);
300 }; 453 };
301 454
302 }; 455 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698