OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** @fileoverview Externs generated from namespace: developerPrivate */ | 5 /** @fileoverview Externs generated from namespace: developerPrivate */ |
6 | 6 |
7 // Note: hand-modified to change Array to !Array and add types to the array, | 7 /** |
8 // and to add enum definitions. | 8 * @const |
9 */ | |
10 chrome.developerPrivate = {}; | |
9 | 11 |
10 /** | 12 /** |
11 * @typedef {string} | 13 * @enum {string} |
12 */ | 14 */ |
13 var ItemType; | 15 chrome.developerPrivate.ItemType = { |
16 hosted_app: 'hosted_app', | |
17 packaged_app: 'packaged_app', | |
18 legacy_packaged_app: 'legacy_packaged_app', | |
19 extension: 'extension', | |
20 theme: 'theme', | |
21 }; | |
14 | 22 |
15 /** | 23 /** |
16 * @typedef {{ | 24 * @typedef {{ |
17 * path: string, | 25 * path: string, |
18 * render_process_id: number, | 26 * render_process_id: number, |
19 * render_view_id: number, | 27 * render_view_id: number, |
20 * incognito: boolean, | 28 * incognito: boolean, |
21 * generatedBackgroundPage: boolean | 29 * generatedBackgroundPage: boolean |
22 * }} | 30 * }} |
23 */ | 31 */ |
24 var ItemInspectView; | 32 var ItemInspectView; |
25 | 33 |
26 /** | 34 /** |
35 * @typedef {{ | |
36 * extension_id: string, | |
37 * render_process_id: (string|number), | |
38 * render_view_id: (string|number), | |
39 * incognito: boolean | |
40 * }} | |
41 */ | |
42 var InspectOptions; | |
43 | |
44 /** | |
45 * @typedef {{ | |
46 * message: string | |
47 * }} | |
48 */ | |
49 var InstallWarning; | |
50 | |
51 /** | |
27 * @enum {string} | 52 * @enum {string} |
28 */ | 53 */ |
29 chrome.developerPrivate.ExtensionType = { | 54 chrome.developerPrivate.ExtensionType = { |
30 HOSTED_APP: 'HOSTED_APP', | 55 HOSTED_APP: 'HOSTED_APP', |
31 PLATFORM_APP: 'PLATFORM_APP', | 56 PLATFORM_APP: 'PLATFORM_APP', |
32 LEGACY_PACKAGED_APP: 'LEGACY_PACKAGED_APP', | 57 LEGACY_PACKAGED_APP: 'LEGACY_PACKAGED_APP', |
33 EXTENSION: 'EXTENSION', | 58 EXTENSION: 'EXTENSION', |
34 THEME: 'THEME', | 59 THEME: 'THEME', |
35 SHARED_MODULE: 'SHARED_MODULE' | 60 SHARED_MODULE: 'SHARED_MODULE', |
36 }; | 61 }; |
37 | 62 |
38 /** | 63 /** |
39 * @enum {string} | 64 * @enum {string} |
40 */ | 65 */ |
41 chrome.developerPrivate.Location = { | 66 chrome.developerPrivate.Location = { |
42 FROM_STORE: 'FROM_STORE', | 67 FROM_STORE: 'FROM_STORE', |
43 UNPACKED: 'UNPACKED', | 68 UNPACKED: 'UNPACKED', |
44 THIRD_PARTY: 'THIRD_PARTY', | 69 THIRD_PARTY: 'THIRD_PARTY', |
45 UNKNOWN: 'UNKNOWN' | 70 UNKNOWN: 'UNKNOWN', |
46 }; | 71 }; |
47 | 72 |
48 /** | 73 /** |
49 * @enum {string} | 74 * @enum {string} |
50 */ | 75 */ |
51 chrome.developerPrivate.ViewType = { | 76 chrome.developerPrivate.ViewType = { |
52 APP_WINDOW: 'APP_WINDOW', | 77 APP_WINDOW: 'APP_WINDOW', |
53 BACKGROUND_CONTENTS: 'BACKGROUND_CONTENTS', | 78 BACKGROUND_CONTENTS: 'BACKGROUND_CONTENTS', |
54 EXTENSION_BACKGROUND_PAGE: 'EXTENSION_BACKGROUND_PAGE', | 79 EXTENSION_BACKGROUND_PAGE: 'EXTENSION_BACKGROUND_PAGE', |
55 EXTENSION_DIALOG: 'EXTENSION_DIALOG', | 80 EXTENSION_DIALOG: 'EXTENSION_DIALOG', |
56 EXTENSION_POPUP: 'EXTENSION_POPUP', | 81 EXTENSION_POPUP: 'EXTENSION_POPUP', |
57 LAUNCHER_PAGE: 'LAUNCHER_PAGE', | 82 LAUNCHER_PAGE: 'LAUNCHER_PAGE', |
58 PANEL: 'PANEL', | 83 PANEL: 'PANEL', |
59 TAB_CONTENTS: 'TAB_CONTENTS', | 84 TAB_CONTENTS: 'TAB_CONTENTS', |
60 VIRTUAL_KEYBOARD: 'VIRTUAL_KEYBOARD' | 85 VIRTUAL_KEYBOARD: 'VIRTUAL_KEYBOARD', |
61 }; | 86 }; |
62 | 87 |
63 /** | 88 /** |
64 * @enum {string} | 89 * @enum {string} |
65 */ | 90 */ |
66 chrome.developerPrivate.ErrorType = { | 91 chrome.developerPrivate.ErrorType = { |
67 MANIFEST: 'MANIFEST', | 92 MANIFEST: 'MANIFEST', |
68 RUNTIME: 'RUNTIME' | 93 RUNTIME: 'RUNTIME', |
69 }; | 94 }; |
70 | 95 |
71 /** | 96 /** |
72 * @enum {string} | 97 * @enum {string} |
73 */ | 98 */ |
74 chrome.developerPrivate.ErrorLevel = { | 99 chrome.developerPrivate.ErrorLevel = { |
75 LOG: 'LOG', | 100 LOG: 'LOG', |
76 WARN: 'WARN', | 101 WARN: 'WARN', |
77 ERROR: 'ERROR' | 102 ERROR: 'ERROR', |
78 }; | 103 }; |
79 | 104 |
80 /** | 105 /** |
81 * @enum {string} | 106 * @enum {string} |
82 */ | 107 */ |
83 chrome.developerPrivate.ExtensionState = { | 108 chrome.developerPrivate.ExtensionState = { |
84 ENABLED: 'ENABLED', | 109 ENABLED: 'ENABLED', |
85 DISABLED: 'DISABLED', | 110 DISABLED: 'DISABLED', |
86 TERMINATED: 'TERMINATED' | 111 TERMINATED: 'TERMINATED', |
87 }; | 112 }; |
88 | 113 |
89 /** | 114 /** |
90 * @typedef {{ | 115 * @typedef {{ |
91 * message: string | |
92 * }} | |
93 */ | |
94 var InstallWarning; | |
95 | |
96 /** | |
97 * @typedef {{ | |
98 * isEnabled: boolean, | 116 * isEnabled: boolean, |
99 * isActive: boolean | 117 * isActive: boolean |
100 * }} | 118 * }} |
101 */ | 119 */ |
102 var AccessModifier; | 120 var AccessModifier; |
103 | 121 |
104 /** | 122 /** |
105 * @typedef {{ | 123 * @typedef {{ |
106 * lineNumber: number, | 124 * lineNumber: number, |
107 * columnNumber: number, | 125 * columnNumber: number, |
108 * url: string, | 126 * url: string, |
109 * functionName: string | 127 * functionName: string |
110 * }} | 128 * }} |
111 */ | 129 */ |
112 var StackFrame; | 130 var StackFrame; |
113 | 131 |
114 /** | 132 /** |
115 * @typedef {{ | 133 * @typedef {{ |
116 * type: chrome.developerPrivate.ErrorType, | 134 * type: !chrome.developerPrivate.ErrorType, |
117 * extensionId: string, | 135 * extensionId: string, |
118 * fromIncognito: boolean, | 136 * fromIncognito: boolean, |
119 * source: string, | 137 * source: string, |
120 * message: string, | 138 * message: string, |
121 * manifestKey: string, | 139 * manifestKey: string, |
122 * manifestSpecific: (string|undefined) | 140 * manifestSpecific: (string|undefined) |
123 * }} | 141 * }} |
124 */ | 142 */ |
125 var ManifestError; | 143 var ManifestError; |
126 | 144 |
127 /** | 145 /** |
128 * @typedef {{ | 146 * @typedef {{ |
129 * type: chrome.developerPrivate.ErrorType, | 147 * type: !chrome.developerPrivate.ErrorType, |
130 * extensionId: string, | 148 * extensionId: string, |
131 * fromIncognito: boolean, | 149 * fromIncognito: boolean, |
132 * source: string, | 150 * source: string, |
133 * message: string, | 151 * message: string, |
134 * severity: chrome.developerPrivate.ErrorLevel, | 152 * severity: !chrome.developerPrivate.ErrorLevel, |
135 * contextUrl: string, | 153 * contextUrl: string, |
136 * occurrences: number, | 154 * occurrences: number, |
137 * renderViewId: number, | 155 * renderViewId: number, |
138 * renderProcessId: number, | 156 * renderProcessId: number, |
139 * canInspect: boolean, | 157 * canInspect: boolean, |
140 * stackTrace: !Array<StackFrame> | 158 * stackTrace: !Array<StackFrame> |
141 * }} | 159 * }} |
142 */ | 160 */ |
143 var RuntimeError; | 161 var RuntimeError; |
144 | 162 |
(...skipping 21 matching lines...) Expand all Loading... | |
166 * }} | 184 * }} |
167 */ | 185 */ |
168 var HomePage; | 186 var HomePage; |
169 | 187 |
170 /** | 188 /** |
171 * @typedef {{ | 189 * @typedef {{ |
172 * url: string, | 190 * url: string, |
173 * renderProcessId: number, | 191 * renderProcessId: number, |
174 * renderViewId: number, | 192 * renderViewId: number, |
175 * incognito: boolean, | 193 * incognito: boolean, |
176 * type: chrome.developerPrivate.ViewType | 194 * type: !chrome.developerPrivate.ViewType |
177 * }} | 195 * }} |
178 */ | 196 */ |
179 var ExtensionView; | 197 var ExtensionView; |
180 | 198 |
181 /** | 199 /** |
182 * @typedef {{ | 200 * @typedef {{ |
183 * actionButtonHidden: boolean, | 201 * actionButtonHidden: boolean, |
184 * blacklistText: (string|undefined), | 202 * blacklistText: (string|undefined), |
185 * dependentExtensions: !Array<string>, | 203 * dependentExtensions: !Array<string>, |
186 * description: string, | 204 * description: string, |
187 * disableReasons: DisableReasons, | 205 * disableReasons: DisableReasons, |
188 * errorCollection: AccessModifier, | 206 * errorCollection: AccessModifier, |
189 * fileAccess: AccessModifier, | 207 * fileAccess: AccessModifier, |
190 * homePage: HomePage, | 208 * homePage: HomePage, |
191 * iconUrl: string, | 209 * iconUrl: string, |
192 * id: string, | 210 * id: string, |
193 * incognitoAccess: AccessModifier, | 211 * incognitoAccess: AccessModifier, |
194 * installedByCustodian: boolean, | 212 * installedByCustodian: boolean, |
195 * installWarnings: !Array<string>, | 213 * installWarnings: !Array<string>, |
196 * launchUrl: (string|undefined), | 214 * launchUrl: (string|undefined), |
197 * location: chrome.developerPrivate.Location, | 215 * location: !chrome.developerPrivate.Location, |
198 * locationText: (string|undefined), | 216 * locationText: (string|undefined), |
199 * manifestErrors: !Array<ManifestError>, | 217 * manifestErrors: !Array<ManifestError>, |
200 * mustRemainInstalled: boolean, | 218 * mustRemainInstalled: boolean, |
201 * name: string, | 219 * name: string, |
202 * offlineEnabled: boolean, | 220 * offlineEnabled: boolean, |
203 * optionsPage: (OptionsPage|undefined), | 221 * optionsPage: (OptionsPage|undefined), |
204 * path: (string|undefined), | 222 * path: (string|undefined), |
205 * policyText: (string|undefined), | 223 * policyText: (string|undefined), |
206 * prettifiedPath: (string|undefined), | 224 * prettifiedPath: (string|undefined), |
207 * runOnAllUrls: AccessModifier, | 225 * runOnAllUrls: AccessModifier, |
208 * runtimeErrors: !Array<RuntimeError>, | 226 * runtimeErrors: !Array<RuntimeError>, |
209 * runtimeWarnings: !Array<string>, | 227 * runtimeWarnings: !Array<string>, |
210 * state: chrome.developerPrivate.ExtensionState, | 228 * state: !chrome.developerPrivate.ExtensionState, |
211 * type: chrome.developerPrivate.ExtensionType, | 229 * type: !chrome.developerPrivate.ExtensionType, |
212 * updateUrl: string, | 230 * updateUrl: string, |
213 * userMayModify: boolean, | 231 * userMayModify: boolean, |
214 * version: string, | 232 * version: string, |
215 * views: !Array<ExtensionView> | 233 * views: !Array<ExtensionView> |
216 * }} | 234 * }} |
217 */ | 235 */ |
218 var ExtensionInfo; | 236 var ExtensionInfo; |
219 | 237 |
220 /** | 238 /** |
221 * @typedef {{ | 239 * @typedef {{ |
222 * id: string, | 240 * id: string, |
223 * name: string, | 241 * name: string, |
224 * version: string, | 242 * version: string, |
225 * description: string, | 243 * description: string, |
226 * may_disable: boolean, | 244 * may_disable: boolean, |
227 * enabled: boolean, | 245 * enabled: boolean, |
228 * isApp: boolean, | 246 * isApp: boolean, |
229 * type: ItemType, | 247 * type: !chrome.developerPrivate.ItemType, |
230 * allow_activity: boolean, | 248 * allow_activity: boolean, |
231 * allow_file_access: boolean, | 249 * allow_file_access: boolean, |
232 * wants_file_access: boolean, | 250 * wants_file_access: boolean, |
233 * incognito_enabled: boolean, | 251 * incognito_enabled: boolean, |
234 * is_unpacked: boolean, | 252 * is_unpacked: boolean, |
235 * allow_reload: boolean, | 253 * allow_reload: boolean, |
236 * terminated: boolean, | 254 * terminated: boolean, |
237 * allow_incognito: boolean, | 255 * allow_incognito: boolean, |
238 * icon_url: string, | 256 * icon_url: string, |
239 * path: (string|undefined), | 257 * path: (string|undefined), |
240 * options_url: (string|undefined), | 258 * options_url: (string|undefined), |
241 * app_launch_url: (string|undefined), | 259 * app_launch_url: (string|undefined), |
242 * homepage_url: (string|undefined), | 260 * homepage_url: (string|undefined), |
243 * update_url: (string|undefined), | 261 * update_url: (string|undefined), |
244 * install_warnings: !Array<InstallWarning>, | 262 * install_warnings: !Array<InstallWarning>, |
245 * manifest_errors: !Array<Object>, | 263 * manifest_errors: !Array<*>, |
246 * runtime_errors: !Array<Object>, | 264 * runtime_errors: !Array<*>, |
Dan Beam
2015/03/26 20:36:00
:_(
Devlin
2015/03/26 22:36:36
Sad, but correct - it's declared as an "any" in th
| |
247 * offline_enabled: boolean, | 265 * offline_enabled: boolean, |
248 * views: !Array<ItemInspectView> | 266 * views: !Array<ItemInspectView> |
249 * }} | 267 * }} |
250 */ | 268 */ |
251 var ItemInfo; | 269 var ItemInfo; |
252 | 270 |
253 /** | 271 /** |
254 * @typedef {{ | 272 * @typedef {{ |
255 * includeDisabled: (boolean|undefined), | 273 * includeDisabled: (boolean|undefined), |
256 * includeTerminated: (boolean|undefined) | 274 * includeTerminated: (boolean|undefined) |
257 * }} | 275 * }} |
258 */ | 276 */ |
259 var GetExtensionsInfoOptions; | 277 var GetExtensionsInfoOptions; |
260 | 278 |
261 /** | 279 /** |
262 * @typedef {{ | 280 * @typedef {{ |
263 * extension_id: string, | |
264 * render_process_id: (string|number), | |
265 * render_view_id: (string|number), | |
266 * incognito: boolean | |
267 * }} | |
268 */ | |
269 var InspectOptions; | |
270 | |
271 /** | |
272 * @typedef {{ | |
273 * extensionId: string, | 281 * extensionId: string, |
274 * fileAccess: (boolean|undefined), | 282 * fileAccess: (boolean|undefined), |
275 * incognitoAccess: (boolean|undefined), | 283 * incognitoAccess: (boolean|undefined), |
276 * errorCollection: (boolean|undefined), | 284 * errorCollection: (boolean|undefined), |
277 * runOnAllUrls: (boolean|undefined), | 285 * runOnAllUrls: (boolean|undefined), |
278 * showActionButton: (boolean|undefined) | 286 * showActionButton: (boolean|undefined) |
279 * }} | 287 * }} |
280 */ | 288 */ |
281 var ExtensionConfigurationUpdate; | 289 var ExtensionConfigurationUpdate; |
282 | 290 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
320 }; | 328 }; |
321 | 329 |
322 /** | 330 /** |
323 * @enum {string} | 331 * @enum {string} |
324 */ | 332 */ |
325 chrome.developerPrivate.EventType = { | 333 chrome.developerPrivate.EventType = { |
326 INSTALLED: 'INSTALLED', | 334 INSTALLED: 'INSTALLED', |
327 UNINSTALLED: 'UNINSTALLED', | 335 UNINSTALLED: 'UNINSTALLED', |
328 LOADED: 'LOADED', | 336 LOADED: 'LOADED', |
329 UNLOADED: 'UNLOADED', | 337 UNLOADED: 'UNLOADED', |
330 // New window / view opened. | |
331 VIEW_REGISTERED: 'VIEW_REGISTERED', | 338 VIEW_REGISTERED: 'VIEW_REGISTERED', |
332 // window / view closed. | |
333 VIEW_UNREGISTERED: 'VIEW_UNREGISTERED', | 339 VIEW_UNREGISTERED: 'VIEW_UNREGISTERED', |
334 ERROR_ADDED: 'ERROR_ADDED', | 340 ERROR_ADDED: 'ERROR_ADDED', |
335 } | 341 }; |
336 | 342 |
337 /** | 343 /** |
338 * @typedef {{ | 344 * @typedef {{ |
339 * message: string, | 345 * message: string, |
340 * item_path: string, | 346 * item_path: string, |
341 * pem_path: string, | 347 * pem_path: string, |
342 * override_flags: number, | 348 * override_flags: number, |
343 * status: chrome.developerPrivate.PackStatus | 349 * status: !chrome.developerPrivate.PackStatus |
344 * }} | 350 * }} |
345 */ | 351 */ |
346 var PackDirectoryResponse; | 352 var PackDirectoryResponse; |
347 | 353 |
348 /** | 354 /** |
349 * @typedef {{ | 355 * @typedef {{ |
350 * name: string | 356 * name: string |
351 * }} | 357 * }} |
352 */ | 358 */ |
353 var ProjectInfo; | 359 var ProjectInfo; |
354 | 360 |
355 /** | 361 /** |
356 * @typedef {{ | 362 * @typedef {{ |
357 * event_type: chrome.developerPrivate.EventType, | 363 * event_type: !chrome.developerPrivate.EventType, |
358 * item_id: string | 364 * item_id: string |
359 * }} | 365 * }} |
360 */ | 366 */ |
361 var EventData; | 367 var EventData; |
362 | 368 |
363 /** | 369 /** |
364 * @typedef {{ | 370 * @typedef {{ |
365 * extensionId: string, | 371 * extensionId: string, |
366 * pathSuffix: string, | 372 * pathSuffix: string, |
367 * message: string, | 373 * message: string, |
(...skipping 10 matching lines...) Expand all Loading... | |
378 * beforeHighlight: string, | 384 * beforeHighlight: string, |
379 * afterHighlight: string, | 385 * afterHighlight: string, |
380 * title: string, | 386 * title: string, |
381 * message: string | 387 * message: string |
382 * }} | 388 * }} |
383 */ | 389 */ |
384 var RequestFileSourceResponse; | 390 var RequestFileSourceResponse; |
385 | 391 |
386 /** | 392 /** |
387 * @typedef {{ | 393 * @typedef {{ |
394 * extensionId: (string|undefined), | |
388 * renderViewId: number, | 395 * renderViewId: number, |
389 * renderProcessId: number, | 396 * renderProcessId: number, |
397 * incognito: (boolean|undefined), | |
390 * url: (string|undefined), | 398 * url: (string|undefined), |
391 * lineNumber: (number|undefined), | 399 * lineNumber: (number|undefined), |
392 * columnNumber: (number|undefined) | 400 * columnNumber: (number|undefined) |
393 * }} | 401 * }} |
394 */ | 402 */ |
395 var OpenDevToolsProperties; | 403 var OpenDevToolsProperties; |
396 | 404 |
397 /** | 405 /** |
398 * @typedef {{ | 406 * @typedef {{ |
399 * extensionId: string, | 407 * extensionId: string, |
400 * errorIds: (Array<number>|undefined), | 408 * errorIds: (!Array<number>|undefined), |
401 * type: (chrome.developerPrivate.ErrorType|undefined) | 409 * type: (!chrome.developerPrivate.ErrorType|undefined) |
402 * }} | 410 * }} |
403 */ | 411 */ |
404 var DeleteExtensionErrorsProperties; | 412 var DeleteExtensionErrorsProperties; |
405 | 413 |
406 /** | 414 /** |
407 * @const | |
408 */ | |
409 chrome.developerPrivate = {}; | |
410 | |
411 /** | |
412 * Runs auto update for extensions and apps immediately. | 415 * Runs auto update for extensions and apps immediately. |
413 * @param {Function=} callback Called with the boolean result, true if | 416 * @param {function(boolean):void=} callback Called with the boolean result, |
Dan Beam
2015/03/26 20:36:00
:-)
| |
414 * autoUpdate is successful. | 417 * true if autoUpdate is successful. |
415 */ | 418 */ |
416 chrome.developerPrivate.autoUpdate = function(callback) {}; | 419 chrome.developerPrivate.autoUpdate = function(callback) {}; |
417 | 420 |
418 /** | 421 /** |
419 * Returns information of all the extensions and apps installed. | 422 * Returns information of all the extensions and apps installed. |
420 * @param {GetExtensionsInfoOptions=} options Options to restrict the items | 423 * @param {GetExtensionsInfoOptions=} options Options to restrict the items |
421 * returned. | 424 * returned. |
422 * @param {Function=} callback Called with extensions info. | 425 * @param {function(!Array<ExtensionInfo>):void=} callback Called with |
426 * extensions info. | |
423 */ | 427 */ |
424 chrome.developerPrivate.getExtensionsInfo = function(options, callback) {}; | 428 chrome.developerPrivate.getExtensionsInfo = function(options, callback) {}; |
425 | 429 |
426 /** | 430 /** |
427 * Returns information of a particular extension. | 431 * Returns information of a particular extension. |
428 * @param {string} id The id of the extension. | 432 * @param {string} id The id of the extension. |
429 * @param {Function=} callback Called with the result. | 433 * @param {function(ExtensionInfo):void=} callback Called with the result. |
430 */ | 434 */ |
431 chrome.developerPrivate.getExtensionInfo = function(id, callback) {}; | 435 chrome.developerPrivate.getExtensionInfo = function(id, callback) {}; |
432 | 436 |
433 /** | 437 /** |
434 * Returns information of all the extensions and apps installed. | 438 * Returns information of all the extensions and apps installed. |
435 * @param {boolean} includeDisabled include disabled items. | 439 * @param {boolean} includeDisabled include disabled items. |
436 * @param {boolean} includeTerminated include terminated items. | 440 * @param {boolean} includeTerminated include terminated items. |
437 * @param {Function} callback Called with items info. | 441 * @param {function(!Array<ItemInfo>):void} callback Called with items info. |
442 * DEPRECATED: Prefer getExtensionsInfo. | |
438 */ | 443 */ |
439 chrome.developerPrivate.getItemsInfo = function(includeDisabled, includeTerminat ed, callback) {}; | 444 chrome.developerPrivate.getItemsInfo = function(includeDisabled, includeTerminat ed, callback) {}; |
440 | 445 |
441 /** | 446 /** |
442 * Opens a permissions dialog. | 447 * Opens a permissions dialog. |
443 * @param {string} extensionId The id of the extension to show permissions for. | 448 * @param {string} extensionId The id of the extension to show permissions for. |
444 * @param {Function=} callback | 449 * @param {function():void=} callback |
445 */ | 450 */ |
446 chrome.developerPrivate.showPermissionsDialog = function(extensionId, callback) {}; | 451 chrome.developerPrivate.showPermissionsDialog = function(extensionId, callback) {}; |
447 | 452 |
448 /** | 453 /** |
449 * Opens a developer tools inspection window. | |
450 * @param {InspectOptions} options The details about the inspection. | |
451 * @param {Function=} callback | |
452 */ | |
453 chrome.developerPrivate.inspect = function(options, callback) {}; | |
454 | |
455 /** | |
456 * Enables / Disables file access for an extension. | |
457 * @param {string} extensionId The id of the extension to set file access for. | |
458 * @param {boolean} allow Whether or not to allow file access for the | |
459 * extension. | |
460 * @param {Function=} callback | |
461 */ | |
462 chrome.developerPrivate.allowFileAccess = function(extensionId, allow, callback) {}; | |
463 | |
464 /** | |
465 * Reloads a given extension. | 454 * Reloads a given extension. |
466 * @param {string} extensionId The id of the extension to reload. | 455 * @param {string} extensionId The id of the extension to reload. |
467 * @param {ReloadOptions=} options Additional configuration parameters. | 456 * @param {ReloadOptions=} options Additional configuration parameters. |
468 * @param {Function=} callback | 457 * @param {function():void=} callback |
469 */ | 458 */ |
470 chrome.developerPrivate.reload = function(extensionId, options, callback) {}; | 459 chrome.developerPrivate.reload = function(extensionId, options, callback) {}; |
471 | 460 |
472 /** | 461 /** |
473 * Modifies an extension's current configuration. | 462 * Modifies an extension's current configuration. |
474 * @param {ExtensionConfigurationUpdate} update The parameters for updating the extension's configuration. Any properties omitted from |update| will not be chan ged. | 463 * @param {ExtensionConfigurationUpdate} update The parameters for updating the |
475 * @param {Function=} callback | 464 * extension's configuration. Any properties omitted from |update| will not |
465 * be changed. | |
466 * @param {function():void=} callback | |
476 */ | 467 */ |
477 chrome.developerPrivate.updateExtensionConfiguration = function(update, callback ) {}; | 468 chrome.developerPrivate.updateExtensionConfiguration = function(update, callback ) {}; |
478 | 469 |
479 /** | 470 /** |
480 * Enables / Disables a given extension. | |
481 * @param {string} extensionId The id of the extension to enable/disable. | |
482 * @param {boolean} enable Whether the extension should be enabled. | |
483 * @param {Function=} callback | |
484 */ | |
485 chrome.developerPrivate.enable = function(extensionId, enable, callback) {}; | |
486 | |
487 /** | |
488 * Allows / Disallows an extension to run in incognito mode. | |
489 * @param {string} extensionId The id of the extension. | |
490 * @param {boolean} allow Whether or not the extension should be allowed | |
491 * incognito. | |
492 * @param {Function=} callback | |
493 */ | |
494 chrome.developerPrivate.allowIncognito = function(extensionId, allow, callback) {}; | |
495 | |
496 /** | |
497 * Loads a user-selected unpacked item. | 471 * Loads a user-selected unpacked item. |
498 * @param {LoadUnpackedOptions=} options Additional configuration parameters. | 472 * @param {LoadUnpackedOptions=} options Additional configuration parameters. |
499 * @param {Function=} callback | 473 * @param {function():void=} callback |
500 */ | 474 */ |
501 chrome.developerPrivate.loadUnpacked = function(options, callback) {}; | 475 chrome.developerPrivate.loadUnpacked = function(options, callback) {}; |
502 | 476 |
503 /** | 477 /** |
504 * Loads an extension / app. | 478 * Loads an extension / app. |
505 * @param {Object} directory The directory to load the extension from. | 479 * @param {Object} directory The directory to load the extension from. |
506 * @param {Function} callback | 480 * @param {function(string):void} callback |
507 */ | 481 */ |
508 chrome.developerPrivate.loadDirectory = function(directory, callback) {}; | 482 chrome.developerPrivate.loadDirectory = function(directory, callback) {}; |
509 | 483 |
510 /** | 484 /** |
511 * Open Dialog to browse to an entry. | 485 * Open Dialog to browse to an entry. |
512 * @param {chrome.developerPrivate.SelectType} selectType | 486 * @param {!chrome.developerPrivate.SelectType} selectType Select a file or a |
513 * Select a file or a folder. | 487 * folder. |
Dan Beam
2015/03/26 20:36:00
ideally these would be 4\s indented, but whatevs
Dan Beam
2015/03/26 20:36:00
do we wanna even bother wrapping externs? might a
Devlin
2015/03/26 22:36:36
Y'know, it was starting to bother me too. Since i
Devlin
2015/03/27 23:16:41
And, now that https://codereview.chromium.org/1010
| |
514 * @param {chrome.developerPrivate.FileType} fileType | 488 * @param {!chrome.developerPrivate.FileType} fileType Required file type. For |
515 * Required file type. For example, pem type is for | 489 * example, pem type is for private key and load type is for an unpacked item. |
516 * private key and load type is for an unpacked item. | 490 * @param {function(string):void} callback called with selected item's path. |
517 * @param {Function} callback called with selected item's path. | |
518 */ | 491 */ |
519 chrome.developerPrivate.choosePath = function(selectType, fileType, callback) {} ; | 492 chrome.developerPrivate.choosePath = function(selectType, fileType, callback) {} ; |
520 | 493 |
521 /** | 494 /** |
522 * Pack an extension. | 495 * Pack an extension. |
523 * @param {string} path | 496 * @param {string} path |
524 * @param {string=} privateKeyPath The path of the private key, if one is | 497 * @param {string=} privateKeyPath The path of the private key, if one is |
525 * given. | 498 * given. |
526 * @param {number=} flags Special flags to apply to the loading process, if | 499 * @param {number=} flags Special flags to apply to the loading process, if |
527 * any. | 500 * any. |
528 * @param {Function=} callback called with the success result string. | 501 * @param {function(PackDirectoryResponse):void=} callback called with the |
502 * success result string. | |
529 */ | 503 */ |
530 chrome.developerPrivate.packDirectory = function(path, privateKeyPath, flags, ca llback) {}; | 504 chrome.developerPrivate.packDirectory = function(path, privateKeyPath, flags, ca llback) {}; |
531 | 505 |
532 /** | 506 /** |
533 * Returns true if the profile is managed. | 507 * Returns true if the profile is managed. |
534 * @param {Function} callback | 508 * @param {function(boolean):void} callback |
535 */ | 509 */ |
536 chrome.developerPrivate.isProfileManaged = function(callback) {}; | 510 chrome.developerPrivate.isProfileManaged = function(callback) {}; |
537 | 511 |
538 /** | 512 /** |
539 * Reads and returns the contents of a file related to an extension which | 513 * Reads and returns the contents of a file related to an extension which |
540 * caused an error. | 514 * caused an error. |
541 * @param {RequestFileSourceProperties} properties | 515 * @param {RequestFileSourceProperties} properties |
542 * @param {Function} callback | 516 * @param {function(RequestFileSourceResponse):void} callback |
543 */ | 517 */ |
544 chrome.developerPrivate.requestFileSource = function(properties, callback) {}; | 518 chrome.developerPrivate.requestFileSource = function(properties, callback) {}; |
545 | 519 |
546 /** | 520 /** |
547 * Open the developer tools to focus on a particular error. | 521 * Open the developer tools to focus on a particular error. |
548 * @param {OpenDevToolsProperties} properties | 522 * @param {OpenDevToolsProperties} properties |
523 * @param {function():void=} callback | |
549 */ | 524 */ |
550 chrome.developerPrivate.openDevTools = function(properties) {}; | 525 chrome.developerPrivate.openDevTools = function(properties, callback) {}; |
551 | 526 |
552 /** | 527 /** |
553 * Delete reported extension erors. | 528 * Delete reported extension erors. |
554 * @param {DeleteExtensionErrorsProperties} properties The properties specifying | 529 * @param {DeleteExtensionErrorsProperties} properties |
555 * the errors to remove. | 530 * @param {function():void=} callback |
556 * @param {Function=} callback | |
557 */ | 531 */ |
558 chrome.developerPrivate.deleteExtensionErrors = function(properties, callback) { }; | 532 chrome.developerPrivate.deleteExtensionErrors = function(properties, callback) { }; |
559 | 533 |
534 /** | |
535 * @param {string} id | |
536 * @param {boolean} enabled | |
537 * @param {function():void=} callback | |
538 * @deprecated Use management.setEnabled | |
539 */ | |
540 chrome.developerPrivate.enable = function(id, enabled, callback) {}; | |
541 | |
542 /** | |
543 * @param {string} extensionId | |
544 * @param {boolean} allow | |
545 * @param {function():void=} callback | |
546 * @deprecated Use updateExtensionConfiguration | |
547 */ | |
548 chrome.developerPrivate.allowIncognito = function(extensionId, allow, callback) {}; | |
549 | |
550 /** | |
551 * @param {string} extensionId | |
552 * @param {boolean} allow | |
553 * @param {function():void=} callback | |
554 * @deprecated Use updateExtensionConfiguration | |
555 */ | |
556 chrome.developerPrivate.allowFileAccess = function(extensionId, allow, callback) {}; | |
557 | |
558 /** | |
559 * @param {InspectOptions} options | |
560 * @param {function():void=} callback | |
561 * @deprecated Use openDevTools | |
562 */ | |
563 chrome.developerPrivate.inspect = function(options, callback) {}; | |
564 | |
560 /** @type {!ChromeEvent} */ | 565 /** @type {!ChromeEvent} */ |
561 chrome.developerPrivate.onItemStateChanged; | 566 chrome.developerPrivate.onItemStateChanged; |
OLD | NEW |