| Index: third_party/closure_compiler/externs/developer_private.js
|
| diff --git a/third_party/closure_compiler/externs/developer_private.js b/third_party/closure_compiler/externs/developer_private.js
|
| index e1ca94c424162a713081fe18884d7cd152db3583..6a6c89326fa2ac0cfa06024667818f4641cbd98a 100644
|
| --- a/third_party/closure_compiler/externs/developer_private.js
|
| +++ b/third_party/closure_compiler/externs/developer_private.js
|
| @@ -4,13 +4,21 @@
|
|
|
| /** @fileoverview Externs generated from namespace: developerPrivate */
|
|
|
| -// Note: hand-modified to change Array to !Array and add types to the array,
|
| -// and to add enum definitions.
|
| +/**
|
| + * @const
|
| + */
|
| +chrome.developerPrivate = {};
|
|
|
| /**
|
| - * @typedef {string}
|
| + * @enum {string}
|
| */
|
| -var ItemType;
|
| +chrome.developerPrivate.ItemType = {
|
| + hosted_app: 'hosted_app',
|
| + packaged_app: 'packaged_app',
|
| + legacy_packaged_app: 'legacy_packaged_app',
|
| + extension: 'extension',
|
| + theme: 'theme',
|
| +};
|
|
|
| /**
|
| * @typedef {{
|
| @@ -24,6 +32,23 @@ var ItemType;
|
| var ItemInspectView;
|
|
|
| /**
|
| + * @typedef {{
|
| + * extension_id: string,
|
| + * render_process_id: (string|number),
|
| + * render_view_id: (string|number),
|
| + * incognito: boolean
|
| + * }}
|
| + */
|
| +var InspectOptions;
|
| +
|
| +/**
|
| + * @typedef {{
|
| + * message: string
|
| + * }}
|
| + */
|
| +var InstallWarning;
|
| +
|
| +/**
|
| * @enum {string}
|
| */
|
| chrome.developerPrivate.ExtensionType = {
|
| @@ -32,7 +57,7 @@ chrome.developerPrivate.ExtensionType = {
|
| LEGACY_PACKAGED_APP: 'LEGACY_PACKAGED_APP',
|
| EXTENSION: 'EXTENSION',
|
| THEME: 'THEME',
|
| - SHARED_MODULE: 'SHARED_MODULE'
|
| + SHARED_MODULE: 'SHARED_MODULE',
|
| };
|
|
|
| /**
|
| @@ -42,7 +67,7 @@ chrome.developerPrivate.Location = {
|
| FROM_STORE: 'FROM_STORE',
|
| UNPACKED: 'UNPACKED',
|
| THIRD_PARTY: 'THIRD_PARTY',
|
| - UNKNOWN: 'UNKNOWN'
|
| + UNKNOWN: 'UNKNOWN',
|
| };
|
|
|
| /**
|
| @@ -57,7 +82,7 @@ chrome.developerPrivate.ViewType = {
|
| LAUNCHER_PAGE: 'LAUNCHER_PAGE',
|
| PANEL: 'PANEL',
|
| TAB_CONTENTS: 'TAB_CONTENTS',
|
| - VIRTUAL_KEYBOARD: 'VIRTUAL_KEYBOARD'
|
| + VIRTUAL_KEYBOARD: 'VIRTUAL_KEYBOARD',
|
| };
|
|
|
| /**
|
| @@ -65,7 +90,7 @@ chrome.developerPrivate.ViewType = {
|
| */
|
| chrome.developerPrivate.ErrorType = {
|
| MANIFEST: 'MANIFEST',
|
| - RUNTIME: 'RUNTIME'
|
| + RUNTIME: 'RUNTIME',
|
| };
|
|
|
| /**
|
| @@ -74,7 +99,7 @@ chrome.developerPrivate.ErrorType = {
|
| chrome.developerPrivate.ErrorLevel = {
|
| LOG: 'LOG',
|
| WARN: 'WARN',
|
| - ERROR: 'ERROR'
|
| + ERROR: 'ERROR',
|
| };
|
|
|
| /**
|
| @@ -83,18 +108,11 @@ chrome.developerPrivate.ErrorLevel = {
|
| chrome.developerPrivate.ExtensionState = {
|
| ENABLED: 'ENABLED',
|
| DISABLED: 'DISABLED',
|
| - TERMINATED: 'TERMINATED'
|
| + TERMINATED: 'TERMINATED',
|
| };
|
|
|
| /**
|
| * @typedef {{
|
| - * message: string
|
| - * }}
|
| - */
|
| -var InstallWarning;
|
| -
|
| -/**
|
| - * @typedef {{
|
| * isEnabled: boolean,
|
| * isActive: boolean
|
| * }}
|
| @@ -113,7 +131,7 @@ var StackFrame;
|
|
|
| /**
|
| * @typedef {{
|
| - * type: chrome.developerPrivate.ErrorType,
|
| + * type: !chrome.developerPrivate.ErrorType,
|
| * extensionId: string,
|
| * fromIncognito: boolean,
|
| * source: string,
|
| @@ -126,12 +144,12 @@ var ManifestError;
|
|
|
| /**
|
| * @typedef {{
|
| - * type: chrome.developerPrivate.ErrorType,
|
| + * type: !chrome.developerPrivate.ErrorType,
|
| * extensionId: string,
|
| * fromIncognito: boolean,
|
| * source: string,
|
| * message: string,
|
| - * severity: chrome.developerPrivate.ErrorLevel,
|
| + * severity: !chrome.developerPrivate.ErrorLevel,
|
| * contextUrl: string,
|
| * occurrences: number,
|
| * renderViewId: number,
|
| @@ -173,7 +191,7 @@ var HomePage;
|
| * renderProcessId: number,
|
| * renderViewId: number,
|
| * incognito: boolean,
|
| - * type: chrome.developerPrivate.ViewType
|
| + * type: !chrome.developerPrivate.ViewType
|
| * }}
|
| */
|
| var ExtensionView;
|
| @@ -194,7 +212,7 @@ var ExtensionView;
|
| * installedByCustodian: boolean,
|
| * installWarnings: !Array<string>,
|
| * launchUrl: (string|undefined),
|
| - * location: chrome.developerPrivate.Location,
|
| + * location: !chrome.developerPrivate.Location,
|
| * locationText: (string|undefined),
|
| * manifestErrors: !Array<ManifestError>,
|
| * mustRemainInstalled: boolean,
|
| @@ -207,8 +225,8 @@ var ExtensionView;
|
| * runOnAllUrls: AccessModifier,
|
| * runtimeErrors: !Array<RuntimeError>,
|
| * runtimeWarnings: !Array<string>,
|
| - * state: chrome.developerPrivate.ExtensionState,
|
| - * type: chrome.developerPrivate.ExtensionType,
|
| + * state: !chrome.developerPrivate.ExtensionState,
|
| + * type: !chrome.developerPrivate.ExtensionType,
|
| * updateUrl: string,
|
| * userMayModify: boolean,
|
| * version: string,
|
| @@ -226,7 +244,7 @@ var ExtensionInfo;
|
| * may_disable: boolean,
|
| * enabled: boolean,
|
| * isApp: boolean,
|
| - * type: ItemType,
|
| + * type: !chrome.developerPrivate.ItemType,
|
| * allow_activity: boolean,
|
| * allow_file_access: boolean,
|
| * wants_file_access: boolean,
|
| @@ -242,8 +260,8 @@ var ExtensionInfo;
|
| * homepage_url: (string|undefined),
|
| * update_url: (string|undefined),
|
| * install_warnings: !Array<InstallWarning>,
|
| - * manifest_errors: !Array<Object>,
|
| - * runtime_errors: !Array<Object>,
|
| + * manifest_errors: !Array<*>,
|
| + * runtime_errors: !Array<*>,
|
| * offline_enabled: boolean,
|
| * views: !Array<ItemInspectView>
|
| * }}
|
| @@ -260,16 +278,6 @@ var GetExtensionsInfoOptions;
|
|
|
| /**
|
| * @typedef {{
|
| - * extension_id: string,
|
| - * render_process_id: (string|number),
|
| - * render_view_id: (string|number),
|
| - * incognito: boolean
|
| - * }}
|
| - */
|
| -var InspectOptions;
|
| -
|
| -/**
|
| - * @typedef {{
|
| * extensionId: string,
|
| * fileAccess: (boolean|undefined),
|
| * incognitoAccess: (boolean|undefined),
|
| @@ -327,12 +335,10 @@ chrome.developerPrivate.EventType = {
|
| UNINSTALLED: 'UNINSTALLED',
|
| LOADED: 'LOADED',
|
| UNLOADED: 'UNLOADED',
|
| - // New window / view opened.
|
| VIEW_REGISTERED: 'VIEW_REGISTERED',
|
| - // window / view closed.
|
| VIEW_UNREGISTERED: 'VIEW_UNREGISTERED',
|
| ERROR_ADDED: 'ERROR_ADDED',
|
| -}
|
| +};
|
|
|
| /**
|
| * @typedef {{
|
| @@ -340,7 +346,7 @@ chrome.developerPrivate.EventType = {
|
| * item_path: string,
|
| * pem_path: string,
|
| * override_flags: number,
|
| - * status: chrome.developerPrivate.PackStatus
|
| + * status: !chrome.developerPrivate.PackStatus
|
| * }}
|
| */
|
| var PackDirectoryResponse;
|
| @@ -354,7 +360,7 @@ var ProjectInfo;
|
|
|
| /**
|
| * @typedef {{
|
| - * event_type: chrome.developerPrivate.EventType,
|
| + * event_type: !chrome.developerPrivate.EventType,
|
| * item_id: string
|
| * }}
|
| */
|
| @@ -385,8 +391,10 @@ var RequestFileSourceResponse;
|
|
|
| /**
|
| * @typedef {{
|
| + * extensionId: (string|undefined),
|
| * renderViewId: number,
|
| * renderProcessId: number,
|
| + * incognito: (boolean|undefined),
|
| * url: (string|undefined),
|
| * lineNumber: (number|undefined),
|
| * columnNumber: (number|undefined)
|
| @@ -397,36 +405,32 @@ var OpenDevToolsProperties;
|
| /**
|
| * @typedef {{
|
| * extensionId: string,
|
| - * errorIds: (Array<number>|undefined),
|
| - * type: (chrome.developerPrivate.ErrorType|undefined)
|
| + * errorIds: (!Array<number>|undefined),
|
| + * type: (!chrome.developerPrivate.ErrorType|undefined)
|
| * }}
|
| */
|
| var DeleteExtensionErrorsProperties;
|
|
|
| /**
|
| - * @const
|
| - */
|
| -chrome.developerPrivate = {};
|
| -
|
| -/**
|
| * Runs auto update for extensions and apps immediately.
|
| - * @param {Function=} callback Called with the boolean result, true if
|
| - * autoUpdate is successful.
|
| + * @param {function(boolean):void=} callback Called with the boolean result,
|
| + * true if autoUpdate is successful.
|
| */
|
| chrome.developerPrivate.autoUpdate = function(callback) {};
|
|
|
| /**
|
| * Returns information of all the extensions and apps installed.
|
| * @param {GetExtensionsInfoOptions=} options Options to restrict the items
|
| - * returned.
|
| - * @param {Function=} callback Called with extensions info.
|
| + * returned.
|
| + * @param {function(!Array<ExtensionInfo>):void=} callback Called with
|
| + * extensions info.
|
| */
|
| chrome.developerPrivate.getExtensionsInfo = function(options, callback) {};
|
|
|
| /**
|
| * Returns information of a particular extension.
|
| * @param {string} id The id of the extension.
|
| - * @param {Function=} callback Called with the result.
|
| + * @param {function(ExtensionInfo):void=} callback Called with the result.
|
| */
|
| chrome.developerPrivate.getExtensionInfo = function(id, callback) {};
|
|
|
| @@ -434,128 +438,128 @@ chrome.developerPrivate.getExtensionInfo = function(id, callback) {};
|
| * Returns information of all the extensions and apps installed.
|
| * @param {boolean} includeDisabled include disabled items.
|
| * @param {boolean} includeTerminated include terminated items.
|
| - * @param {Function} callback Called with items info.
|
| + * @param {function(!Array<ItemInfo>):void} callback Called with items info.
|
| + * @deprecated Use getExtensionsInfo
|
| */
|
| chrome.developerPrivate.getItemsInfo = function(includeDisabled, includeTerminated, callback) {};
|
|
|
| /**
|
| * Opens a permissions dialog.
|
| * @param {string} extensionId The id of the extension to show permissions for.
|
| - * @param {Function=} callback
|
| + * @param {function():void=} callback
|
| */
|
| chrome.developerPrivate.showPermissionsDialog = function(extensionId, callback) {};
|
|
|
| /**
|
| - * Opens a developer tools inspection window.
|
| - * @param {InspectOptions} options The details about the inspection.
|
| - * @param {Function=} callback
|
| - */
|
| -chrome.developerPrivate.inspect = function(options, callback) {};
|
| -
|
| -/**
|
| - * Enables / Disables file access for an extension.
|
| - * @param {string} extensionId The id of the extension to set file access for.
|
| - * @param {boolean} allow Whether or not to allow file access for the
|
| - * extension.
|
| - * @param {Function=} callback
|
| - */
|
| -chrome.developerPrivate.allowFileAccess = function(extensionId, allow, callback) {};
|
| -
|
| -/**
|
| * Reloads a given extension.
|
| * @param {string} extensionId The id of the extension to reload.
|
| * @param {ReloadOptions=} options Additional configuration parameters.
|
| - * @param {Function=} callback
|
| + * @param {function():void=} callback
|
| */
|
| chrome.developerPrivate.reload = function(extensionId, options, callback) {};
|
|
|
| /**
|
| * Modifies an extension's current configuration.
|
| - * @param {ExtensionConfigurationUpdate} update The parameters for updating the extension's configuration. Any properties omitted from |update| will not be changed.
|
| - * @param {Function=} callback
|
| + * @param {ExtensionConfigurationUpdate} update The parameters for updating the
|
| + * extension's configuration. Any properties omitted from |update| will
|
| + * not be changed.
|
| + * @param {function():void=} callback
|
| */
|
| chrome.developerPrivate.updateExtensionConfiguration = function(update, callback) {};
|
|
|
| /**
|
| - * Enables / Disables a given extension.
|
| - * @param {string} extensionId The id of the extension to enable/disable.
|
| - * @param {boolean} enable Whether the extension should be enabled.
|
| - * @param {Function=} callback
|
| - */
|
| -chrome.developerPrivate.enable = function(extensionId, enable, callback) {};
|
| -
|
| -/**
|
| - * Allows / Disallows an extension to run in incognito mode.
|
| - * @param {string} extensionId The id of the extension.
|
| - * @param {boolean} allow Whether or not the extension should be allowed
|
| - * incognito.
|
| - * @param {Function=} callback
|
| - */
|
| -chrome.developerPrivate.allowIncognito = function(extensionId, allow, callback) {};
|
| -
|
| -/**
|
| * Loads a user-selected unpacked item.
|
| * @param {LoadUnpackedOptions=} options Additional configuration parameters.
|
| - * @param {Function=} callback
|
| + * @param {function():void=} callback
|
| */
|
| chrome.developerPrivate.loadUnpacked = function(options, callback) {};
|
|
|
| /**
|
| * Loads an extension / app.
|
| * @param {Object} directory The directory to load the extension from.
|
| - * @param {Function} callback
|
| + * @param {function(string):void} callback
|
| */
|
| chrome.developerPrivate.loadDirectory = function(directory, callback) {};
|
|
|
| /**
|
| * Open Dialog to browse to an entry.
|
| - * @param {chrome.developerPrivate.SelectType} selectType
|
| - * Select a file or a folder.
|
| - * @param {chrome.developerPrivate.FileType} fileType
|
| - * Required file type. For example, pem type is for
|
| - * private key and load type is for an unpacked item.
|
| - * @param {Function} callback called with selected item's path.
|
| + * @param {!chrome.developerPrivate.SelectType} selectType Select a file or a
|
| + * folder.
|
| + * @param {!chrome.developerPrivate.FileType} fileType Required file type. For
|
| + * example, pem type is for private key and load type is for an unpacked
|
| + * item.
|
| + * @param {function(string):void} callback called with selected item's path.
|
| */
|
| chrome.developerPrivate.choosePath = function(selectType, fileType, callback) {};
|
|
|
| /**
|
| * Pack an extension.
|
| * @param {string} path
|
| - * @param {string=} privateKeyPath The path of the private key, if one is
|
| - * given.
|
| - * @param {number=} flags Special flags to apply to the loading process, if
|
| - * any.
|
| - * @param {Function=} callback called with the success result string.
|
| + * @param {string=} privateKeyPath The path of the private key, if one is given.
|
| + * @param {number=} flags Special flags to apply to the loading process, if any.
|
| + * @param {function(PackDirectoryResponse):void=} callback called with the
|
| + * success result string.
|
| */
|
| chrome.developerPrivate.packDirectory = function(path, privateKeyPath, flags, callback) {};
|
|
|
| /**
|
| * Returns true if the profile is managed.
|
| - * @param {Function} callback
|
| + * @param {function(boolean):void} callback
|
| */
|
| chrome.developerPrivate.isProfileManaged = function(callback) {};
|
|
|
| /**
|
| - * Reads and returns the contents of a file related to an extension which
|
| - * caused an error.
|
| + * Reads and returns the contents of a file related to an extension which caused
|
| + * an error.
|
| * @param {RequestFileSourceProperties} properties
|
| - * @param {Function} callback
|
| + * @param {function(RequestFileSourceResponse):void} callback
|
| */
|
| chrome.developerPrivate.requestFileSource = function(properties, callback) {};
|
|
|
| /**
|
| * Open the developer tools to focus on a particular error.
|
| * @param {OpenDevToolsProperties} properties
|
| + * @param {function():void=} callback
|
| */
|
| -chrome.developerPrivate.openDevTools = function(properties) {};
|
| +chrome.developerPrivate.openDevTools = function(properties, callback) {};
|
|
|
| /**
|
| * Delete reported extension erors.
|
| - * @param {DeleteExtensionErrorsProperties} properties The properties specifying
|
| - * the errors to remove.
|
| - * @param {Function=} callback
|
| + * @param {DeleteExtensionErrorsProperties} properties
|
| + * @param {function():void=} callback
|
| */
|
| chrome.developerPrivate.deleteExtensionErrors = function(properties, callback) {};
|
|
|
| +/**
|
| + * @param {string} id
|
| + * @param {boolean} enabled
|
| + * @param {function():void=} callback
|
| + * @deprecated Use management.setEnabled
|
| + */
|
| +chrome.developerPrivate.enable = function(id, enabled, callback) {};
|
| +
|
| +/**
|
| + * @param {string} extensionId
|
| + * @param {boolean} allow
|
| + * @param {function():void=} callback
|
| + * @deprecated Use updateExtensionConfiguration
|
| + */
|
| +chrome.developerPrivate.allowIncognito = function(extensionId, allow, callback) {};
|
| +
|
| +/**
|
| + * @param {string} extensionId
|
| + * @param {boolean} allow
|
| + * @param {function():void=} callback
|
| + * @deprecated Use updateExtensionConfiguration
|
| + */
|
| +chrome.developerPrivate.allowFileAccess = function(extensionId, allow, callback) {};
|
| +
|
| +/**
|
| + * @param {InspectOptions} options
|
| + * @param {function():void=} callback
|
| + * @deprecated Use openDevTools
|
| + */
|
| +chrome.developerPrivate.inspect = function(options, callback) {};
|
| +
|
| /** @type {!ChromeEvent} */
|
| chrome.developerPrivate.onItemStateChanged;
|
|
|