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 * @see https://developer.chrome.com/extensions/developerPrivate#type-CommandScope
128 chrome.developerPrivate.CommandScope = {
135 * isEnabled: boolean,
138 * @see https://developer.chrome.com/extensions/developerPrivate#type-AccessModifier
144 * lineNumber: number,
145 * columnNumber: number,
147 * functionName: string
149 * @see https://developer.chrome.com/extensions/developerPrivate#type-StackFrame
155 * type: !chrome.developerPrivate.ErrorType,
156 * extensionId: string,
157 * fromIncognito: boolean,
161 * manifestKey: string,
162 * manifestSpecific: (string|undefined)
164 * @see https://developer.chrome.com/extensions/developerPrivate#type-ManifestError
170 * type: !chrome.developerPrivate.ErrorType,
171 * extensionId: string,
172 * fromIncognito: boolean,
176 * severity: !chrome.developerPrivate.ErrorLevel,
177 * contextUrl: string,
178 * occurrences: number,
179 * renderViewId: number,
180 * renderProcessId: number,
181 * canInspect: boolean,
182 * stackTrace: !Array<StackFrame>
184 * @see https://developer.chrome.com/extensions/developerPrivate#type-RuntimeError
190 * suspiciousInstall: boolean,
191 * corruptInstall: boolean,
192 * updateRequired: boolean
194 * @see https://developer.chrome.com/extensions/developerPrivate#type-DisableReasons
200 * openInTab: boolean,
203 * @see https://developer.chrome.com/extensions/developerPrivate#type-OptionsPage
212 * @see https://developer.chrome.com/extensions/developerPrivate#type-HomePage
219 * renderProcessId: number,
220 * renderViewId: number,
221 * incognito: boolean,
222 * type: !chrome.developerPrivate.ViewType
224 * @see https://developer.chrome.com/extensions/developerPrivate#type-ExtensionView
231 chrome.developerPrivate.ControllerType = {
233 CHILD_CUSTODIAN: 'CHILD_CUSTODIAN',
234 SUPERVISED_USER_CUSTODIAN: 'SUPERVISED_USER_CUSTODIAN',
239 * type: !chrome.developerPrivate.ControllerType,
247 * description: string,
248 * keybinding: string,
251 * scope: !chrome.developerPrivate.CommandScope,
252 * isExtensionAction: boolean
254 * @see https://developer.chrome.com/extensions/developerPrivate#type-Command
260 * actionButtonHidden: boolean,
261 * blacklistText: (string|undefined),
262 * commands: !Array<Command>,
263 * controlledInfo: (ControlledInfo|undefined),
264 * dependentExtensions: !Array<string>,
265 * description: string,
266 * disableReasons: DisableReasons,
267 * errorCollection: AccessModifier,
268 * fileAccess: AccessModifier,
269 * homePage: HomePage,
272 * incognitoAccess: AccessModifier,
273 * installWarnings: !Array<string>,
274 * launchUrl: (string|undefined),
275 * location: !chrome.developerPrivate.Location,
276 * locationText: (string|undefined),
277 * manifestErrors: !Array<ManifestError>,
278 * mustRemainInstalled: boolean,
280 * offlineEnabled: boolean,
281 * optionsPage: (OptionsPage|undefined),
282 * path: (string|undefined),
283 * prettifiedPath: (string|undefined),
284 * runOnAllUrls: AccessModifier,
285 * runtimeErrors: !Array<RuntimeError>,
286 * runtimeWarnings: !Array<string>,
287 * state: !chrome.developerPrivate.ExtensionState,
288 * type: !chrome.developerPrivate.ExtensionType,
290 * userMayModify: boolean,
292 * views: !Array<ExtensionView>
294 * @see https://developer.chrome.com/extensions/developerPrivate#type-ExtensionInfo
300 * appInfoDialogEnabled: boolean,
301 * canLoadUnpacked: boolean,
302 * inDeveloperMode: boolean,
303 * isIncognitoAvailable: boolean,
304 * isSupervised: boolean
306 * @see https://developer.chrome.com/extensions/developerPrivate#type-ProfileInfo
315 * description: string,
316 * may_disable: boolean,
319 * type: !chrome.developerPrivate.ItemType,
320 * allow_activity: boolean,
321 * allow_file_access: boolean,
322 * wants_file_access: boolean,
323 * incognito_enabled: boolean,
324 * is_unpacked: boolean,
325 * allow_reload: boolean,
326 * terminated: boolean,
327 * allow_incognito: boolean,
329 * path: (string|undefined),
330 * options_url: (string|undefined),
331 * app_launch_url: (string|undefined),
332 * homepage_url: (string|undefined),
333 * update_url: (string|undefined),
334 * install_warnings: !Array<InstallWarning>,
335 * manifest_errors: !Array<*>,
336 * runtime_errors: !Array<*>,
337 * offline_enabled: boolean,
338 * views: !Array<ItemInspectView>
340 * @see https://developer.chrome.com/extensions/developerPrivate#type-ItemInfo
346 * includeDisabled: (boolean|undefined),
347 * includeTerminated: (boolean|undefined)
349 * @see https://developer.chrome.com/extensions/developerPrivate#type-GetExtensionsInfoOptions
351 var GetExtensionsInfoOptions;
355 * extensionId: string,
356 * fileAccess: (boolean|undefined),
357 * incognitoAccess: (boolean|undefined),
358 * errorCollection: (boolean|undefined),
359 * runOnAllUrls: (boolean|undefined),
360 * showActionButton: (boolean|undefined)
362 * @see https://developer.chrome.com/extensions/developerPrivate#type-ExtensionConfigurationUpdate
364 var ExtensionConfigurationUpdate;
368 * inDeveloperMode: (boolean|undefined)
370 * @see https://developer.chrome.com/extensions/developerPrivate#type-ProfileConfigurationUpdate
372 var ProfileConfigurationUpdate;
376 * extensionId: string,
377 * commandName: string,
378 * scope: (!chrome.developerPrivate.CommandScope|undefined),
379 * keybinding: (string|undefined)
381 * @see https://developer.chrome.com/extensions/developerPrivate#type-ExtensionCommandUpdate
383 var ExtensionCommandUpdate;
387 * failQuietly: (boolean|undefined)
389 * @see https://developer.chrome.com/extensions/developerPrivate#type-ReloadOptions
395 * failQuietly: (boolean|undefined)
397 * @see https://developer.chrome.com/extensions/developerPrivate#type-LoadUnpackedOptions
399 var LoadUnpackedOptions;
403 * @see https://developer.chrome.com/extensions/developerPrivate#type-PackStatus
405 chrome.developerPrivate.PackStatus = {
413 * @see https://developer.chrome.com/extensions/developerPrivate#type-FileType
415 chrome.developerPrivate.FileType = {
422 * @see https://developer.chrome.com/extensions/developerPrivate#type-SelectType
424 chrome.developerPrivate.SelectType = {
431 * @see https://developer.chrome.com/extensions/developerPrivate#type-EventType
433 chrome.developerPrivate.EventType = {
434 INSTALLED: 'INSTALLED',
435 UNINSTALLED: 'UNINSTALLED',
437 UNLOADED: 'UNLOADED',
438 VIEW_REGISTERED: 'VIEW_REGISTERED',
439 VIEW_UNREGISTERED: 'VIEW_UNREGISTERED',
440 ERROR_ADDED: 'ERROR_ADDED',
441 ERRORS_REMOVED: 'ERRORS_REMOVED',
442 PREFS_CHANGED: 'PREFS_CHANGED',
443 WARNINGS_CHANGED: 'WARNINGS_CHANGED',
451 * override_flags: number,
452 * status: !chrome.developerPrivate.PackStatus
454 * @see https://developer.chrome.com/extensions/developerPrivate#type-PackDirectoryResponse
456 var PackDirectoryResponse;
462 * @see https://developer.chrome.com/extensions/developerPrivate#type-ProjectInfo
468 * event_type: !chrome.developerPrivate.EventType,
470 * extensionInfo: (ExtensionInfo|undefined)
472 * @see https://developer.chrome.com/extensions/developerPrivate#type-EventData
478 * extensionId: string,
479 * pathSuffix: string,
481 * manifestKey: (string|undefined),
482 * manifestSpecific: (string|undefined),
483 * lineNumber: (number|undefined)
485 * @see https://developer.chrome.com/extensions/developerPrivate#type-RequestFileSourceProperties
487 var RequestFileSourceProperties;
492 * beforeHighlight: string,
493 * afterHighlight: string,
497 * @see https://developer.chrome.com/extensions/developerPrivate#type-RequestFileSourceResponse
499 var RequestFileSourceResponse;
503 * extensionId: (string|undefined),
504 * renderViewId: number,
505 * renderProcessId: number,
506 * incognito: (boolean|undefined),
507 * url: (string|undefined),
508 * lineNumber: (number|undefined),
509 * columnNumber: (number|undefined)
511 * @see https://developer.chrome.com/extensions/developerPrivate#type-OpenDevToolsProperties
513 var OpenDevToolsProperties;
517 * extensionId: string,
518 * errorIds: (!Array<number>|undefined),
519 * type: (!chrome.developerPrivate.ErrorType|undefined)
521 * @see https://developer.chrome.com/extensions/developerPrivate#type-DeleteExtensionErrorsProperties
523 var DeleteExtensionErrorsProperties;
526 * Runs auto update for extensions and apps immediately.
527 * @param {function(boolean):void=} callback Called with the boolean result,
528 * true if autoUpdate is successful.
529 * @see https://developer.chrome.com/extensions/developerPrivate#method-autoUpdate
531 chrome.developerPrivate.autoUpdate = function(callback) {};
534 * Returns information of all the extensions and apps installed.
535 * @param {GetExtensionsInfoOptions=} options Options to restrict the items
537 * @param {function(!Array<ExtensionInfo>):void=} callback Called with
539 * @see https://developer.chrome.com/extensions/developerPrivate#method-getExtensionsInfo
541 chrome.developerPrivate.getExtensionsInfo = function(options, callback) {};
544 * Returns information of a particular extension.
545 * @param {string} id The id of the extension.
546 * @param {function(ExtensionInfo):void=} callback Called with the result.
547 * @see https://developer.chrome.com/extensions/developerPrivate#method-getExtensionInfo
549 chrome.developerPrivate.getExtensionInfo = function(id, callback) {};
552 * Returns information of all the extensions and apps installed.
553 * @param {boolean} includeDisabled include disabled items.
554 * @param {boolean} includeTerminated include terminated items.
555 * @param {function(!Array<ItemInfo>):void} callback Called with items info.
556 * @deprecated Use getExtensionsInfo
557 * @see https://developer.chrome.com/extensions/developerPrivate#method-getItemsInfo
559 chrome.developerPrivate.getItemsInfo = function(includeDisabled, includeTerminated, callback) {};
562 * Returns the current profile's configuration.
563 * @param {function(ProfileInfo):void} callback
564 * @see https://developer.chrome.com/extensions/developerPrivate#method-getProfileConfiguration
566 chrome.developerPrivate.getProfileConfiguration = function(callback) {};
569 * Updates the active profile.
570 * @param {ProfileConfigurationUpdate} update The parameters for updating the
571 * profile's configuration. Any properties omitted from |update| will
573 * @param {function():void=} callback
574 * @see https://developer.chrome.com/extensions/developerPrivate#method-updateProfileConfiguration
576 chrome.developerPrivate.updateProfileConfiguration = function(update, callback) {};
579 * Opens a permissions dialog.
580 * @param {string} extensionId The id of the extension to show permissions for.
581 * @param {function():void=} callback
582 * @see https://developer.chrome.com/extensions/developerPrivate#method-showPermissionsDialog
584 chrome.developerPrivate.showPermissionsDialog = function(extensionId, callback) {};
587 * Reloads a given extension.
588 * @param {string} extensionId The id of the extension to reload.
589 * @param {ReloadOptions=} options Additional configuration parameters.
590 * @param {function():void=} callback
591 * @see https://developer.chrome.com/extensions/developerPrivate#method-reload
593 chrome.developerPrivate.reload = function(extensionId, options, callback) {};
596 * Modifies an extension's current configuration.
597 * @param {ExtensionConfigurationUpdate} update The parameters for updating the
598 * extension's configuration. Any properties omitted from |update| will
600 * @param {function():void=} callback
601 * @see https://developer.chrome.com/extensions/developerPrivate#method-updateExtensionConfiguration
603 chrome.developerPrivate.updateExtensionConfiguration = function(update, callback) {};
606 * Loads a user-selected unpacked item.
607 * @param {LoadUnpackedOptions=} options Additional configuration parameters.
608 * @param {function():void=} callback
609 * @see https://developer.chrome.com/extensions/developerPrivate#method-loadUnpacked
611 chrome.developerPrivate.loadUnpacked = function(options, callback) {};
614 * Loads an extension / app.
615 * @param {Object} directory The directory to load the extension from.
616 * @param {function(string):void} callback
617 * @see https://developer.chrome.com/extensions/developerPrivate#method-loadDirectory
619 chrome.developerPrivate.loadDirectory = function(directory, callback) {};
622 * Open Dialog to browse to an entry.
623 * @param {!chrome.developerPrivate.SelectType} selectType Select a file or a
625 * @param {!chrome.developerPrivate.FileType} fileType Required file type. For
626 * example, pem type is for private key and load type is for an unpacked
628 * @param {function(string):void} callback called with selected item's path.
629 * @see https://developer.chrome.com/extensions/developerPrivate#method-choosePath
631 chrome.developerPrivate.choosePath = function(selectType, fileType, callback) {};
635 * @param {string} path
636 * @param {string=} privateKeyPath The path of the private key, if one is given.
637 * @param {number=} flags Special flags to apply to the loading process, if any.
638 * @param {function(PackDirectoryResponse):void=} callback called with the
639 * success result string.
640 * @see https://developer.chrome.com/extensions/developerPrivate#method-packDirectory
642 chrome.developerPrivate.packDirectory = function(path, privateKeyPath, flags, callback) {};
645 * Returns true if the profile is managed.
646 * @param {function(boolean):void} callback
647 * @see https://developer.chrome.com/extensions/developerPrivate#method-isProfileManaged
649 chrome.developerPrivate.isProfileManaged = function(callback) {};
652 * Reads and returns the contents of a file related to an extension which caused
654 * @param {RequestFileSourceProperties} properties
655 * @param {function(RequestFileSourceResponse):void} callback
656 * @see https://developer.chrome.com/extensions/developerPrivate#method-requestFileSource
658 chrome.developerPrivate.requestFileSource = function(properties, callback) {};
661 * Open the developer tools to focus on a particular error.
662 * @param {OpenDevToolsProperties} properties
663 * @param {function():void=} callback
664 * @see https://developer.chrome.com/extensions/developerPrivate#method-openDevTools
666 chrome.developerPrivate.openDevTools = function(properties, callback) {};
669 * Delete reported extension erors.
670 * @param {DeleteExtensionErrorsProperties} properties The properties specifying
671 * the errors to remove.
672 * @param {function():void=} callback
673 * @see https://developer.chrome.com/extensions/developerPrivate#method-deleteExtensionErrors
675 chrome.developerPrivate.deleteExtensionErrors = function(properties, callback) {};
678 * Repairs the extension specified.
679 * @param {string} extensionId The id of the extension to repair.
680 * @param {function():void=} callback
681 * @see https://developer.chrome.com/extensions/developerPrivate#method-repairExtension
683 chrome.developerPrivate.repairExtension = function(extensionId, callback) {};
686 * Shows the options page for the extension specified.
687 * @param {string} extensionId The id of the extension to show the options page
689 * @param {function():void=} callback
690 * @see https://developer.chrome.com/extensions/developerPrivate#method-showOptions
692 chrome.developerPrivate.showOptions = function(extensionId, callback) {};
695 * Shows the path of the extension specified.
696 * @param {string} extensionId The id of the extension to show the path for.
697 * @param {function():void=} callback
698 * @see https://developer.chrome.com/extensions/developerPrivate#method-showPath
700 chrome.developerPrivate.showPath = function(extensionId, callback) {};
703 * (Un)suspends global shortcut handling.
704 * @param {boolean} isSuspended Whether or not shortcut handling should be
706 * @param {function():void=} callback
707 * @see https://developer.chrome.com/extensions/developerPrivate#method-setShortcutHandlingSuspended
709 chrome.developerPrivate.setShortcutHandlingSuspended = function(isSuspended, callback) {};
712 * Updates an extension command.
713 * @param {ExtensionCommandUpdate} update The parameters for updating the
715 * @param {function():void=} callback
716 * @see https://developer.chrome.com/extensions/developerPrivate#method-updateExtensionCommand
718 chrome.developerPrivate.updateExtensionCommand = function(update, callback) {};
722 * @param {boolean} enabled
723 * @param {function():void=} callback
724 * @deprecated Use management.setEnabled
725 * @see https://developer.chrome.com/extensions/developerPrivate#method-enable
727 chrome.developerPrivate.enable = function(id, enabled, callback) {};
730 * @param {string} extensionId
731 * @param {boolean} allow
732 * @param {function():void=} callback
733 * @deprecated Use updateExtensionConfiguration
734 * @see https://developer.chrome.com/extensions/developerPrivate#method-allowIncognito
736 chrome.developerPrivate.allowIncognito = function(extensionId, allow, callback) {};
739 * @param {string} extensionId
740 * @param {boolean} allow
741 * @param {function():void=} callback
742 * @deprecated Use updateExtensionConfiguration
743 * @see https://developer.chrome.com/extensions/developerPrivate#method-allowFileAccess
745 chrome.developerPrivate.allowFileAccess = function(extensionId, allow, callback) {};
748 * @param {InspectOptions} options
749 * @param {function():void=} callback
750 * @deprecated Use openDevTools
751 * @see https://developer.chrome.com/extensions/developerPrivate#method-inspect
753 chrome.developerPrivate.inspect = function(options, callback) {};
756 * Fired when a item state is changed.
757 * @type {!ChromeEvent}
758 * @see https://developer.chrome.com/extensions/developerPrivate#event-onItemStateChanged
760 chrome.developerPrivate.onItemStateChanged;
763 * Fired when the profile's state has changed.
764 * @type {!ChromeEvent}
765 * @see https://developer.chrome.com/extensions/developerPrivate#event-onProfileStateChanged
767 chrome.developerPrivate.onProfileStateChanged;