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 // This file was generated by:
6 // ./tools/json_schema_compiler/compiler.py.
7 // NOTE: The format of types has changed. 'FooType' is now
8 // 'chrome.management.FooType'.
9 // Please run the closure compiler before committing changes.
10 // See https://code.google.com/p/chromium/wiki/ClosureCompilation.
12 /** @fileoverview Externs generated from namespace: management */
17 chrome.management = {};
20 * Information about an icon belonging to an extension, app, or theme.
25 * @see https://developer.chrome.com/extensions/management#type-IconInfo
27 chrome.management.IconInfo;
31 * @see https://developer.chrome.com/extensions/management#type-LaunchType
33 chrome.management.LaunchType = {
34 OPEN_AS_REGULAR_TAB: 'OPEN_AS_REGULAR_TAB',
35 OPEN_AS_PINNED_TAB: 'OPEN_AS_PINNED_TAB',
36 OPEN_AS_WINDOW: 'OPEN_AS_WINDOW',
37 OPEN_FULL_SCREEN: 'OPEN_FULL_SCREEN',
42 * @see https://developer.chrome.com/extensions/management#type-ExtensionDisabledReason
44 chrome.management.ExtensionDisabledReason = {
46 PERMISSIONS_INCREASE: 'permissions_increase',
51 * @see https://developer.chrome.com/extensions/management#type-ExtensionType
53 chrome.management.ExtensionType = {
54 EXTENSION: 'extension',
55 HOSTED_APP: 'hosted_app',
56 PACKAGED_APP: 'packaged_app',
57 LEGACY_PACKAGED_APP: 'legacy_packaged_app',
63 * @see https://developer.chrome.com/extensions/management#type-ExtensionInstallType
65 chrome.management.ExtensionInstallType = {
67 DEVELOPMENT: 'development',
74 * Information about an installed extension, app, or theme.
79 * description: string,
81 * mayDisable: boolean,
83 * disabledReason: (!chrome.management.ExtensionDisabledReason|undefined),
85 * type: !chrome.management.ExtensionType,
86 * appLaunchUrl: (string|undefined),
87 * homepageUrl: (string|undefined),
88 * updateUrl: (string|undefined),
89 * offlineEnabled: boolean,
91 * icons: (!Array<!chrome.management.IconInfo>|undefined),
92 * permissions: !Array<string>,
93 * hostPermissions: !Array<string>,
94 * installType: !chrome.management.ExtensionInstallType,
95 * launchType: (!chrome.management.LaunchType|undefined),
96 * availableLaunchTypes: (!Array<!chrome.management.LaunchType>|undefined)
98 * @see https://developer.chrome.com/extensions/management#type-ExtensionInfo
100 chrome.management.ExtensionInfo;
103 * Returns a list of information about installed extensions and apps.
104 * @param {function(!Array<!chrome.management.ExtensionInfo>):void=} callback
105 * @see https://developer.chrome.com/extensions/management#method-getAll
107 chrome.management.getAll = function(callback) {};
110 * Returns information about the installed extension, app, or theme that has the
112 * @param {string} id The ID from an item of $(ref:management.ExtensionInfo).
113 * @param {function(!chrome.management.ExtensionInfo):void=} callback
114 * @see https://developer.chrome.com/extensions/management#method-get
116 chrome.management.get = function(id, callback) {};
119 * Returns information about the calling extension, app, or theme. Note: This
120 * function can be used without requesting the 'management' permission in the
122 * @param {function(!chrome.management.ExtensionInfo):void=} callback
123 * @see https://developer.chrome.com/extensions/management#method-getSelf
125 chrome.management.getSelf = function(callback) {};
128 * Returns a list of <a href='permission_warnings'>permission warnings</a> for
129 * the given extension id.
130 * @param {string} id The ID of an already installed extension.
131 * @param {function(!Array<string>):void=} callback
132 * @see https://developer.chrome.com/extensions/management#method-getPermissionWarningsById
134 chrome.management.getPermissionWarningsById = function(id, callback) {};
137 * Returns a list of <a href='permission_warnings'>permission warnings</a> for
138 * the given extension manifest string. Note: This function can be used without
139 * requesting the 'management' permission in the manifest.
140 * @param {string} manifestStr Extension manifest JSON string.
141 * @param {function(!Array<string>):void=} callback
142 * @see https://developer.chrome.com/extensions/management#method-getPermissionWarningsByManifest
144 chrome.management.getPermissionWarningsByManifest = function(manifestStr, callback) {};
147 * Enables or disables an app or extension.
148 * @param {string} id This should be the id from an item of
149 * $(ref:management.ExtensionInfo).
150 * @param {boolean} enabled Whether this item should be enabled or disabled.
151 * @param {function():void=} callback
152 * @see https://developer.chrome.com/extensions/management#method-setEnabled
154 chrome.management.setEnabled = function(id, enabled, callback) {};
157 * Uninstalls a currently installed app or extension.
158 * @param {string} id This should be the id from an item of
159 * $(ref:management.ExtensionInfo).
161 * showConfirmDialog: (boolean|undefined)
163 * @param {function():void=} callback
164 * @see https://developer.chrome.com/extensions/management#method-uninstall
166 chrome.management.uninstall = function(id, options, callback) {};
169 * Uninstalls the calling extension. Note: This function can be used without
170 * requesting the 'management' permission in the manifest.
172 * showConfirmDialog: (boolean|undefined)
174 * @param {function():void=} callback
175 * @see https://developer.chrome.com/extensions/management#method-uninstallSelf
177 chrome.management.uninstallSelf = function(options, callback) {};
180 * Launches an application.
181 * @param {string} id The extension id of the application.
182 * @param {function():void=} callback
183 * @see https://developer.chrome.com/extensions/management#method-launchApp
185 chrome.management.launchApp = function(id, callback) {};
188 * Display options to create shortcuts for an app. On Mac, only packaged app
189 * shortcuts can be created.
190 * @param {string} id This should be the id from an app item of
191 * $(ref:management.ExtensionInfo).
192 * @param {function():void=} callback
193 * @see https://developer.chrome.com/extensions/management#method-createAppShortcut
195 chrome.management.createAppShortcut = function(id, callback) {};
198 * Set the launch type of an app.
199 * @param {string} id This should be the id from an app item of
200 * $(ref:management.ExtensionInfo).
201 * @param {!chrome.management.LaunchType} launchType The target launch type.
202 * Always check and make sure this launch type is in
203 * $(ref:ExtensionInfo.availableLaunchTypes), because the available launch
204 * types vary on different platforms and configurations.
205 * @param {function():void=} callback
206 * @see https://developer.chrome.com/extensions/management#method-setLaunchType
208 chrome.management.setLaunchType = function(id, launchType, callback) {};
211 * Generate an app for a URL. Returns the generated bookmark app.
212 * @param {string} url The URL of a web page. The scheme of the URL can only be
214 * @param {string} title The title of the generated app.
215 * @param {function(!chrome.management.ExtensionInfo):void=} callback
216 * @see https://developer.chrome.com/extensions/management#method-generateAppForLink
218 chrome.management.generateAppForLink = function(url, title, callback) {};
221 * Fired when an app or extension has been installed.
222 * @type {!ChromeEvent}
223 * @see https://developer.chrome.com/extensions/management#event-onInstalled
225 chrome.management.onInstalled;
228 * Fired when an app or extension has been uninstalled.
229 * @type {!ChromeEvent}
230 * @see https://developer.chrome.com/extensions/management#event-onUninstalled
232 chrome.management.onUninstalled;
235 * Fired when an app or extension has been enabled.
236 * @type {!ChromeEvent}
237 * @see https://developer.chrome.com/extensions/management#event-onEnabled
239 chrome.management.onEnabled;
242 * Fired when an app or extension has been disabled.
243 * @type {!ChromeEvent}
244 * @see https://developer.chrome.com/extensions/management#event-onDisabled
246 chrome.management.onDisabled;