diff options
author | rdevlin.cronin <rdevlin.cronin@chromium.org> | 2015-03-12 13:11:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-12 20:12:47 +0000 |
commit | 609f7a872624668960c7da22221924c47a8f885f (patch) | |
tree | 887194c8c18f3f82b81f14ec67ab9673b9413fdf /third_party/closure_compiler | |
parent | 4b36c0fb3320c92764f255f6d51c3c06790d2798 (diff) | |
download | chromium_src-609f7a872624668960c7da22221924c47a8f885f.zip chromium_src-609f7a872624668960c7da22221924c47a8f885f.tar.gz chromium_src-609f7a872624668960c7da22221924c47a8f885f.tar.bz2 |
[Extensions] Make a chrome.developerPrivate.getExtensionsInfo function
Make a new function, developerPrivate.getExtensionsInfo,
to handle generating and returning info about installed
extensions. We do this, instead of adjusting the current
(developerPrivate.getItemsInfo) to allow for breaking
changes - which lets us have consistent style and fewer
parameters.
BUG=461039
Review URL: https://codereview.chromium.org/989813002
Cr-Commit-Position: refs/heads/master@{#320355}
Diffstat (limited to 'third_party/closure_compiler')
-rw-r--r-- | third_party/closure_compiler/externs/developer_private.js | 211 |
1 files changed, 210 insertions, 1 deletions
diff --git a/third_party/closure_compiler/externs/developer_private.js b/third_party/closure_compiler/externs/developer_private.js index bdfd15c..75b8556 100644 --- a/third_party/closure_compiler/externs/developer_private.js +++ b/third_party/closure_compiler/externs/developer_private.js @@ -24,6 +24,69 @@ var ItemType; var ItemInspectView; /** + * @enum {string} + */ +chrome.developerPrivate.ExtensionType = { + HOSTED_APP: 'HOSTED_APP', + PLATFORM_APP: 'PLATFORM_APP', + LEGACY_PACKAGED_APP: 'LEGACY_PACKAGED_APP', + EXTENSION: 'EXTENSION', + THEME: 'THEME', + SHARED_MODULE: 'SHARED_MODULE' +}; + +/** + * @enum {string} + */ +chrome.developerPrivate.Location = { + FROM_STORE: 'FROM_STORE', + UNPACKED: 'UNPACKED', + THIRD_PARTY: 'THIRD_PARTY', + UNKNOWN: 'UNKNOWN' +}; + +/** + * @enum {string} + */ +chrome.developerPrivate.ViewType = { + APP_WINDOW: 'APP_WINDOW', + BACKGROUND_CONTENTS: 'BACKGROUND_CONTENTS', + EXTENSION_BACKGROUND_PAGE: 'EXTENSION_BACKGROUND_PAGE', + EXTENSION_DIALOG: 'EXTENSION_DIALOG', + EXTENSION_POPUP: 'EXTENSION_POPUP', + LAUNCHER_PAGE: 'LAUNCHER_PAGE', + PANEL: 'PANEL', + TAB_CONTENTS: 'TAB_CONTENTS', + VIRTUAL_KEYBOARD: 'VIRTUAL_KEYBOARD' +}; + +/** + * @enum {string} + */ +chrome.developerPrivate.ErrorType = { + MANIFEST: 'MANIFEST', + RUNTIME: 'RUNTIME' +}; + +/** + * @enum {string} + */ +chrome.developerPrivate.ErrorLevel = { + LOG: 'LOG', + WARN: 'WARN', + ERROR: 'ERROR' +}; + +/** + * @enum {string} + */ +chrome.developerPrivate.ExtensionState = { + ENABLED: 'ENABLED', + DISABLED: 'DISABLED', + TERMINATED: 'TERMINATED' +}; + +/** * @typedef {{ * message: string * }} @@ -32,13 +95,136 @@ var InstallWarning; /** * @typedef {{ + * isEnabled: boolean, + * isActive: boolean + * }} + */ +var AccessModifier; + +/** + * @typedef {{ + * lineNumber: number, + * columnNumber: number, + * url: string, + * functionName: string + * }} + */ +var StackFrame; + +/** + * @typedef {{ + * type: chrome.developerPrivate.ErrorType, + * extensionId: string, + * fromIncognito: boolean, + * source: string, + * message: string, + * manifestKey: string, + * manifestSpecific: (string|undefined) + * }} + */ +var ManifestError; + +/** + * @typedef {{ + * type: chrome.developerPrivate.ErrorType, + * extensionId: string, + * fromIncognito: boolean, + * source: string, + * message: string, + * severity: chrome.developerPrivate.ErrorLevel, + * contextUrl: string, + * occurrences: number, + * renderViewId: number, + * renderProcessId: number, + * canInspect: boolean, + * stackTrace: Array + * }} + */ +var RuntimeError; + +/** + * @typedef {{ + * suspiciousInstall: boolean, + * corruptInstall: boolean, + * updateRequired: boolean + * }} + */ +var DisableReasons; + +/** + * @typedef {{ + * openInTab: boolean, + * url: string + * }} + */ +var OptionsPage; + +/** + * @typedef {{ + * url: string, + * specified: boolean + * }} + */ +var HomePage; + +/** + * @typedef {{ + * url: string, + * renderProcessId: number, + * renderViewId: number, + * incognito: boolean, + * type: chrome.developerPrivate.ViewType + * }} + */ +var ExtensionView; + +/** + * @typedef {{ + * actionButtonHidden: boolean, + * blacklistText: (string|undefined), + * dependentExtensions: Array, + * description: string, + * disableReasons: DisableReasons, + * errorCollection: AccessModifier, + * fileAccess: AccessModifier, + * homePage: HomePage, + * iconUrl: string, + * id: string, + * incognitoAccess: AccessModifier, + * installedByCustodian: boolean, + * installWarnings: Array, + * launchUrl: (string|undefined), + * location: chrome.developerPrivate.Location, + * locationText: (string|undefined), + * manifestErrors: Array, + * mustRemainInstalled: boolean, + * name: string, + * offlineEnabled: boolean, + * optionsPage: (OptionsPage|undefined), + * path: (string|undefined), + * policyText: (string|undefined), + * prettifiedPath: (string|undefined), + * runOnAllUrls: AccessModifier, + * runtimeErrors: Array, + * runtimeWarnings: Array, + * state: chrome.developerPrivate.ExtensionState, + * type: chrome.developerPrivate.ExtensionType, + * updateUrl: string, + * userMayModify: boolean, + * version: string, + * views: Array + * }} + */ +var ExtensionInfo; + +/** + * @typedef {{ * id: string, * name: string, * version: string, * description: string, * may_disable: boolean, * enabled: boolean, - * disabled_reason: (string|undefined), * isApp: boolean, * type: ItemType, * allow_activity: boolean, @@ -66,6 +252,14 @@ var ItemInfo; /** * @typedef {{ + * includeDisabled: (boolean|undefined), + * includeTerminated: (boolean|undefined) + * }} + */ +var GetExtensionsInfoOptions; + +/** + * @typedef {{ * extension_id: string, * render_process_id: (string|number), * render_view_id: (string|number), @@ -202,6 +396,21 @@ 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. + */ +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. + */ +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. |