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

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

Powered by Google App Engine
This is Rietveld 408576698