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
3 // found in the LICENSE file.
5 /** @fileoverview Externs generated from namespace: developerPrivate */
10 chrome.developerPrivate = {};
14 * @see https://developer.chrome.com/extensions/developerPrivate#type-ItemType
16 chrome.developerPrivate.ItemType = {
17 HOSTED_APP: 'hosted_app',
18 PACKAGED_APP: 'packaged_app',
19 LEGACY_PACKAGED_APP: 'legacy_packaged_app',
20 EXTENSION: 'extension',
27 * render_process_id: number,
28 * render_view_id: number,
30 * generatedBackgroundPage: boolean
32 * @see https://developer.chrome.com/extensions/developerPrivate#type-ItemInspectView
38 * extension_id: string,
39 * render_process_id: (string|number),
40 * render_view_id: (string|number),
43 * @see https://developer.chrome.com/extensions/developerPrivate#type-InspectOptions
51 * @see https://developer.chrome.com/extensions/developerPrivate#type-InstallWarning
57 * @see https://developer.chrome.com/extensions/developerPrivate#type-ExtensionType
59 chrome.developerPrivate.ExtensionType = {
60 HOSTED_APP: 'HOSTED_APP',
61 PLATFORM_APP: 'PLATFORM_APP',
62 LEGACY_PACKAGED_APP: 'LEGACY_PACKAGED_APP',
63 EXTENSION: 'EXTENSION',
65 SHARED_MODULE: 'SHARED_MODULE',
70 * @see https://developer.chrome.com/extensions/developerPrivate#type-Location
72 chrome.developerPrivate.Location = {
73 FROM_STORE: 'FROM_STORE',
75 THIRD_PARTY: 'THIRD_PARTY',
81 * @see https://developer.chrome.com/extensions/developerPrivate#type-ViewType
83 chrome.developerPrivate.ViewType = {
84 APP_WINDOW: 'APP_WINDOW',
85 BACKGROUND_CONTENTS: 'BACKGROUND_CONTENTS',
86 EXTENSION_BACKGROUND_PAGE: 'EXTENSION_BACKGROUND_PAGE',
87 EXTENSION_DIALOG: 'EXTENSION_DIALOG',
88 EXTENSION_POPUP: 'EXTENSION_POPUP',
89 LAUNCHER_PAGE: 'LAUNCHER_PAGE',
91 TAB_CONTENTS: 'TAB_CONTENTS',
92 VIRTUAL_KEYBOARD: 'VIRTUAL_KEYBOARD',
97 * @see https://developer.chrome.com/extensions/developerPrivate#type-ErrorType
99 chrome.developerPrivate.ErrorType = {
100 MANIFEST: 'MANIFEST',
106 * @see https://developer.chrome.com/extensions/developerPrivate#type-ErrorLevel
108 chrome.developerPrivate.ErrorLevel = {
116 * @see https://developer.chrome.com/extensions/developerPrivate#type-ExtensionState
118 chrome.developerPrivate.ExtensionState = {
120 DISABLED: 'DISABLED',
121 TERMINATED: 'TERMINATED',
126 * isEnabled: boolean,
129 * @see https://developer.chrome.com/extensions/developerPrivate#type-AccessModifier
135 * lineNumber: number,
136 * columnNumber: number,
138 * functionName: string
140 * @see https://developer.chrome.com/extensions/developerPrivate#type-StackFrame
146 * type: !chrome.developerPrivate.ErrorType,
147 * extensionId: string,
148 * fromIncognito: boolean,
152 * manifestKey: string,
153 * manifestSpecific: (string|undefined)
155 * @see https://developer.chrome.com/extensions/developerPrivate#type-ManifestError
161 * type: !chrome.developerPrivate.ErrorType,
162 * extensionId: string,
163 * fromIncognito: boolean,
167 * severity: !chrome.developerPrivate.ErrorLevel,
168 * contextUrl: string,
169 * occurrences: number,
170 * renderViewId: number,
171 * renderProcessId: number,
172 * canInspect: boolean,
173 * stackTrace: !Array<StackFrame>
175 * @see https://developer.chrome.com/extensions/developerPrivate#type-RuntimeError
181 * suspiciousInstall: boolean,
182 * corruptInstall: boolean,
183 * updateRequired: boolean
185 * @see https://developer.chrome.com/extensions/developerPrivate#type-DisableReasons
191 * openInTab: boolean,
194 * @see https://developer.chrome.com/extensions/developerPrivate#type-OptionsPage
203 * @see https://developer.chrome.com/extensions/developerPrivate#type-HomePage
210 * renderProcessId: number,
211 * renderViewId: number,
212 * incognito: boolean,
213 * type: !chrome.developerPrivate.ViewType
215 * @see https://developer.chrome.com/extensions/developerPrivate#type-ExtensionView
222 chrome.developerPrivate.ControllerType = {
224 CHILD_CUSTODIAN: 'CHILD_CUSTODIAN',
225 SUPERVISED_USER_CUSTODIAN: 'SUPERVISED_USER_CUSTODIAN',
230 * type: !chrome.developerPrivate.ControllerType,
238 * actionButtonHidden: boolean,
239 * blacklistText: (string|undefined),
240 * controlledInfo: (ControlledInfo|undefined),
241 * dependentExtensions: !Array<string>,
242 * description: string,
243 * disableReasons: DisableReasons,
244 * errorCollection: AccessModifier,
245 * fileAccess: AccessModifier,
246 * homePage: HomePage,
249 * incognitoAccess: AccessModifier,
250 * installWarnings: !Array<string>,
251 * launchUrl: (string|undefined),
252 * location: !chrome.developerPrivate.Location,
253 * locationText: (string|undefined),
254 * manifestErrors: !Array<ManifestError>,
255 * mustRemainInstalled: boolean,
257 * offlineEnabled: boolean,
258 * optionsPage: (OptionsPage|undefined),
259 * path: (string|undefined),
260 * prettifiedPath: (string|undefined),
261 * runOnAllUrls: AccessModifier,
262 * runtimeErrors: !Array<RuntimeError>,
263 * runtimeWarnings: !Array<string>,
264 * state: !chrome.developerPrivate.ExtensionState,
265 * type: !chrome.developerPrivate.ExtensionType,
267 * userMayModify: boolean,
269 * views: !Array<ExtensionView>
271 * @see https://developer.chrome.com/extensions/developerPrivate#type-ExtensionInfo
277 * appInfoDialogEnabled: boolean,
278 * canLoadUnpacked: boolean,
279 * inDeveloperMode: boolean,
280 * isIncognitoAvailable: boolean,
281 * isSupervised: boolean
283 * @see https://developer.chrome.com/extensions/developerPrivate#type-ProfileInfo
292 * description: string,
293 * may_disable: boolean,
296 * type: !chrome.developerPrivate.ItemType,
297 * allow_activity: boolean,
298 * allow_file_access: boolean,
299 * wants_file_access: boolean,
300 * incognito_enabled: boolean,
301 * is_unpacked: boolean,
302 * allow_reload: boolean,
303 * terminated: boolean,
304 * allow_incognito: boolean,
306 * path: (string|undefined),
307 * options_url: (string|undefined),
308 * app_launch_url: (string|undefined),
309 * homepage_url: (string|undefined),
310 * update_url: (string|undefined),
311 * install_warnings: !Array<InstallWarning>,
312 * manifest_errors: !Array<*>,
313 * runtime_errors: !Array<*>,
314 * offline_enabled: boolean,
315 * views: !Array<ItemInspectView>
317 * @see https://developer.chrome.com/extensions/developerPrivate#type-ItemInfo
323 * includeDisabled: (boolean|undefined),
324 * includeTerminated: (boolean|undefined)
326 * @see https://developer.chrome.com/extensions/developerPrivate#type-GetExtensionsInfoOptions
328 var GetExtensionsInfoOptions;
332 * extensionId: string,
333 * fileAccess: (boolean|undefined),
334 * incognitoAccess: (boolean|undefined),
335 * errorCollection: (boolean|undefined),
336 * runOnAllUrls: (boolean|undefined),
337 * showActionButton: (boolean|undefined)
339 * @see https://developer.chrome.com/extensions/developerPrivate#type-ExtensionConfigurationUpdate
341 var ExtensionConfigurationUpdate;
345 * inDeveloperMode: (boolean|undefined)
347 * @see https://developer.chrome.com/extensions/developerPrivate#type-ProfileConfigurationUpdate
349 var ProfileConfigurationUpdate;
353 * failQuietly: (boolean|undefined)
355 * @see https://developer.chrome.com/extensions/developerPrivate#type-ReloadOptions
361 * failQuietly: (boolean|undefined)
363 * @see https://developer.chrome.com/extensions/developerPrivate#type-LoadUnpackedOptions
365 var LoadUnpackedOptions;
369 * @see https://developer.chrome.com/extensions/developerPrivate#type-PackStatus
371 chrome.developerPrivate.PackStatus = {
379 * @see https://developer.chrome.com/extensions/developerPrivate#type-FileType
381 chrome.developerPrivate.FileType = {
388 * @see https://developer.chrome.com/extensions/developerPrivate#type-SelectType
390 chrome.developerPrivate.SelectType = {
397 * @see https://developer.chrome.com/extensions/developerPrivate#type-EventType
399 chrome.developerPrivate.EventType = {
400 INSTALLED: 'INSTALLED',
401 UNINSTALLED: 'UNINSTALLED',
403 UNLOADED: 'UNLOADED',
404 VIEW_REGISTERED: 'VIEW_REGISTERED',
405 VIEW_UNREGISTERED: 'VIEW_UNREGISTERED',
406 ERROR_ADDED: 'ERROR_ADDED',
407 ERRORS_REMOVED: 'ERRORS_REMOVED',
408 PREFS_CHANGED: 'PREFS_CHANGED',
409 WARNINGS_CHANGED: 'WARNINGS_CHANGED',
417 * override_flags: number,
418 * status: !chrome.developerPrivate.PackStatus
420 * @see https://developer.chrome.com/extensions/developerPrivate#type-PackDirectoryResponse
422 var PackDirectoryResponse;
428 * @see https://developer.chrome.com/extensions/developerPrivate#type-ProjectInfo
434 * event_type: !chrome.developerPrivate.EventType,
436 * extensionInfo: (ExtensionInfo|undefined)
438 * @see https://developer.chrome.com/extensions/developerPrivate#type-EventData
444 * extensionId: string,
445 * pathSuffix: string,
447 * manifestKey: (string|undefined),
448 * manifestSpecific: (string|undefined),
449 * lineNumber: (number|undefined)
451 * @see https://developer.chrome.com/extensions/developerPrivate#type-RequestFileSourceProperties
453 var RequestFileSourceProperties;
458 * beforeHighlight: string,
459 * afterHighlight: string,
463 * @see https://developer.chrome.com/extensions/developerPrivate#type-RequestFileSourceResponse
465 var RequestFileSourceResponse;
469 * extensionId: (string|undefined),
470 * renderViewId: number,
471 * renderProcessId: number,
472 * incognito: (boolean|undefined),
473 * url: (string|undefined),
474 * lineNumber: (number|undefined),
475 * columnNumber: (number|undefined)
477 * @see https://developer.chrome.com/extensions/developerPrivate#type-OpenDevToolsProperties
479 var OpenDevToolsProperties;
483 * extensionId: string,
484 * errorIds: (!Array<number>|undefined),
485 * type: (!chrome.developerPrivate.ErrorType|undefined)
487 * @see https://developer.chrome.com/extensions/developerPrivate#type-DeleteExtensionErrorsProperties
489 var DeleteExtensionErrorsProperties;
492 * Runs auto update for extensions and apps immediately.
493 * @param {function(boolean):void=} callback Called with the boolean result,
494 * true if autoUpdate is successful.
495 * @see https://developer.chrome.com/extensions/developerPrivate#method-autoUpdate
497 chrome.developerPrivate.autoUpdate = function(callback) {};
500 * Returns information of all the extensions and apps installed.
501 * @param {GetExtensionsInfoOptions=} options Options to restrict the items
503 * @param {function(!Array<ExtensionInfo>):void=} callback Called with
505 * @see https://developer.chrome.com/extensions/developerPrivate#method-getExtensionsInfo
507 chrome.developerPrivate.getExtensionsInfo = function(options, callback) {};
510 * Returns information of a particular extension.
511 * @param {string} id The id of the extension.
512 * @param {function(ExtensionInfo):void=} callback Called with the result.
513 * @see https://developer.chrome.com/extensions/developerPrivate#method-getExtensionInfo
515 chrome.developerPrivate.getExtensionInfo = function(id, callback) {};
518 * Returns information of all the extensions and apps installed.
519 * @param {boolean} includeDisabled include disabled items.
520 * @param {boolean} includeTerminated include terminated items.
521 * @param {function(!Array<ItemInfo>):void} callback Called with items info.
522 * @deprecated Use getExtensionsInfo
523 * @see https://developer.chrome.com/extensions/developerPrivate#method-getItemsInfo
525 chrome.developerPrivate.getItemsInfo = function(includeDisabled, includeTerminated, callback) {};
528 * Returns the current profile's configuration.
529 * @param {function(ProfileInfo):void} callback
530 * @see https://developer.chrome.com/extensions/developerPrivate#method-getProfileConfiguration
532 chrome.developerPrivate.getProfileConfiguration = function(callback) {};
535 * Updates the active profile.
536 * @param {ProfileConfigurationUpdate} update The parameters for updating the
537 * profile's configuration. Any properties omitted from |update| will
539 * @param {function():void=} callback
540 * @see https://developer.chrome.com/extensions/developerPrivate#method-updateProfileConfiguration
542 chrome.developerPrivate.updateProfileConfiguration = function(update, callback) {};
545 * Opens a permissions dialog.
546 * @param {string} extensionId The id of the extension to show permissions for.
547 * @param {function():void=} callback
548 * @see https://developer.chrome.com/extensions/developerPrivate#method-showPermissionsDialog
550 chrome.developerPrivate.showPermissionsDialog = function(extensionId, callback) {};
553 * Reloads a given extension.
554 * @param {string} extensionId The id of the extension to reload.
555 * @param {ReloadOptions=} options Additional configuration parameters.
556 * @param {function():void=} callback
557 * @see https://developer.chrome.com/extensions/developerPrivate#method-reload
559 chrome.developerPrivate.reload = function(extensionId, options, callback) {};
562 * Modifies an extension's current configuration.
563 * @param {ExtensionConfigurationUpdate} update The parameters for updating the
564 * extension's configuration. Any properties omitted from |update| will
566 * @param {function():void=} callback
567 * @see https://developer.chrome.com/extensions/developerPrivate#method-updateExtensionConfiguration
569 chrome.developerPrivate.updateExtensionConfiguration = function(update, callback) {};
572 * Loads a user-selected unpacked item.
573 * @param {LoadUnpackedOptions=} options Additional configuration parameters.
574 * @param {function():void=} callback
575 * @see https://developer.chrome.com/extensions/developerPrivate#method-loadUnpacked
577 chrome.developerPrivate.loadUnpacked = function(options, callback) {};
580 * Loads an extension / app.
581 * @param {Object} directory The directory to load the extension from.
582 * @param {function(string):void} callback
583 * @see https://developer.chrome.com/extensions/developerPrivate#method-loadDirectory
585 chrome.developerPrivate.loadDirectory = function(directory, callback) {};
588 * Open Dialog to browse to an entry.
589 * @param {!chrome.developerPrivate.SelectType} selectType Select a file or a
591 * @param {!chrome.developerPrivate.FileType} fileType Required file type. For
592 * example, pem type is for private key and load type is for an unpacked
594 * @param {function(string):void} callback called with selected item's path.
595 * @see https://developer.chrome.com/extensions/developerPrivate#method-choosePath
597 chrome.developerPrivate.choosePath = function(selectType, fileType, callback) {};
601 * @param {string} path
602 * @param {string=} privateKeyPath The path of the private key, if one is given.
603 * @param {number=} flags Special flags to apply to the loading process, if any.
604 * @param {function(PackDirectoryResponse):void=} callback called with the
605 * success result string.
606 * @see https://developer.chrome.com/extensions/developerPrivate#method-packDirectory
608 chrome.developerPrivate.packDirectory = function(path, privateKeyPath, flags, callback) {};
611 * Returns true if the profile is managed.
612 * @param {function(boolean):void} callback
613 * @see https://developer.chrome.com/extensions/developerPrivate#method-isProfileManaged
615 chrome.developerPrivate.isProfileManaged = function(callback) {};
618 * Reads and returns the contents of a file related to an extension which caused
620 * @param {RequestFileSourceProperties} properties
621 * @param {function(RequestFileSourceResponse):void} callback
622 * @see https://developer.chrome.com/extensions/developerPrivate#method-requestFileSource
624 chrome.developerPrivate.requestFileSource = function(properties, callback) {};
627 * Open the developer tools to focus on a particular error.
628 * @param {OpenDevToolsProperties} properties
629 * @param {function():void=} callback
630 * @see https://developer.chrome.com/extensions/developerPrivate#method-openDevTools
632 chrome.developerPrivate.openDevTools = function(properties, callback) {};
635 * Delete reported extension erors.
636 * @param {DeleteExtensionErrorsProperties} properties The properties specifying
637 * the errors to remove.
638 * @param {function():void=} callback
639 * @see https://developer.chrome.com/extensions/developerPrivate#method-deleteExtensionErrors
641 chrome.developerPrivate.deleteExtensionErrors = function(properties, callback) {};
644 * Repairs the extension specified.
645 * @param {string} extensionId The id of the extension to repair.
646 * @param {function():void=} callback
647 * @see https://developer.chrome.com/extensions/developerPrivate#method-repairExtension
649 chrome.developerPrivate.repairExtension = function(extensionId, callback) {};
652 * Shows the options page for the extension specified.
653 * @param {string} extensionId The id of the extension to show the options page
655 * @param {function():void=} callback
656 * @see https://developer.chrome.com/extensions/developerPrivate#method-showOptions
658 chrome.developerPrivate.showOptions = function(extensionId, callback) {};
661 * Shows the path of the extension specified.
662 * @param {string} extensionId The id of the extension to show the path for.
663 * @param {function():void=} callback
664 * @see https://developer.chrome.com/extensions/developerPrivate#method-showPath
666 chrome.developerPrivate.showPath = function(extensionId, callback) {};
670 * @param {boolean} enabled
671 * @param {function():void=} callback
672 * @deprecated Use management.setEnabled
673 * @see https://developer.chrome.com/extensions/developerPrivate#method-enable
675 chrome.developerPrivate.enable = function(id, enabled, callback) {};
678 * @param {string} extensionId
679 * @param {boolean} allow
680 * @param {function():void=} callback
681 * @deprecated Use updateExtensionConfiguration
682 * @see https://developer.chrome.com/extensions/developerPrivate#method-allowIncognito
684 chrome.developerPrivate.allowIncognito = function(extensionId, allow, callback) {};
687 * @param {string} extensionId
688 * @param {boolean} allow
689 * @param {function():void=} callback
690 * @deprecated Use updateExtensionConfiguration
691 * @see https://developer.chrome.com/extensions/developerPrivate#method-allowFileAccess
693 chrome.developerPrivate.allowFileAccess = function(extensionId, allow, callback) {};
696 * @param {InspectOptions} options
697 * @param {function():void=} callback
698 * @deprecated Use openDevTools
699 * @see https://developer.chrome.com/extensions/developerPrivate#method-inspect
701 chrome.developerPrivate.inspect = function(options, callback) {};
704 * Fired when a item state is changed.
705 * @type {!ChromeEvent}
706 * @see https://developer.chrome.com/extensions/developerPrivate#event-onItemStateChanged
708 chrome.developerPrivate.onItemStateChanged;
711 * Fired when the profile's state has changed.
712 * @type {!ChromeEvent}
713 * @see https://developer.chrome.com/extensions/developerPrivate#event-onProfileStateChanged
715 chrome.developerPrivate.onProfileStateChanged;