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 */
7 // Note: hand-modified to change Array to !Array in ItemInfo typedef, and add
8 // typedef {string} for idl enums.
18 * render_process_id: number,
19 * render_view_id: number,
21 * generatedBackgroundPage: boolean
38 * description: string,
39 * may_disable: boolean,
41 * disabled_reason: (string|undefined),
44 * allow_activity: boolean,
45 * allow_file_access: boolean,
46 * wants_file_access: boolean,
47 * incognito_enabled: boolean,
48 * is_unpacked: boolean,
49 * allow_reload: boolean,
50 * terminated: boolean,
51 * allow_incognito: boolean,
53 * path: (string|undefined),
54 * options_url: (string|undefined),
55 * app_launch_url: (string|undefined),
56 * homepage_url: (string|undefined),
57 * update_url: (string|undefined),
58 * install_warnings: !Array,
59 * manifest_errors: !Array,
60 * runtime_errors: !Array,
61 * offline_enabled: boolean,
69 * extension_id: string,
70 * render_process_id: string,
71 * render_view_id: string,
79 * failQuietly: boolean
109 * override_flags: number,
113 var PackDirectoryResponse
;
124 * event_type: EventType,
132 * extensionId: string,
133 * pathSuffix: string,
135 * manifestKey: (string|undefined),
136 * manifestSpecific: (string|undefined),
137 * lineNumber: (number|undefined)
140 var RequestFileSourceProperties
;
145 * beforeHighlight: string,
146 * afterHighlight: string,
151 var RequestFileSourceResponse
;
155 * renderViewId: number,
156 * renderProcessId: number,
157 * url: (string|undefined),
158 * lineNumber: (number|undefined),
159 * columnNumber: (number|undefined)
162 var OpenDevToolsProperties
;
167 chrome
.developerPrivate
= {};
170 * Runs auto update for extensions and apps immediately.
171 * @param {Function=} callback Called with the boolean result, true if
172 * autoUpdate is successful.
174 chrome
.developerPrivate
.autoUpdate = function(callback
) {};
177 * Returns information of all the extensions and apps installed.
178 * @param {boolean} includeDisabled include disabled items.
179 * @param {boolean} includeTerminated include terminated items.
180 * @param {Function} callback Called with items info.
182 chrome
.developerPrivate
.getItemsInfo = function(includeDisabled
, includeTerminated
, callback
) {};
185 * Opens a permissions dialog.
186 * @param {string} extensionId The id of the extension to show permissions for.
187 * @param {Function=} callback
189 chrome
.developerPrivate
.showPermissionsDialog = function(extensionId
, callback
) {};
192 * Opens a developer tools inspection window.
193 * @param {InspectOptions} options The details about the inspection.
194 * @param {Function=} callback
196 chrome
.developerPrivate
.inspect = function(options
, callback
) {};
199 * Enables / Disables file access for an extension.
200 * @param {string} extensionId The id of the extension to set file access for.
201 * @param {boolean} allow Whether or not to allow file access for the
203 * @param {Function=} callback
205 chrome
.developerPrivate
.allowFileAccess = function(extensionId
, allow
, callback
) {};
208 * Reloads a given extension.
209 * @param {string} extensionId The id of the extension to reload.
210 * @param {ReloadOptions=} options Additional configuration parameters.
211 * @param {Function=} callback
213 chrome
.developerPrivate
.reload = function(extensionId
, options
, callback
) {};
216 * Enables / Disables a given extension.
217 * @param {string} extensionId The id of the extension to enable/disable.
218 * @param {boolean} enable Whether the extension should be enabled.
219 * @param {Function=} callback
221 chrome
.developerPrivate
.enable = function(extensionId
, enable
, callback
) {};
224 * Allows / Disallows an extension to run in incognito mode.
225 * @param {string} extensionId The id of the extension.
226 * @param {boolean} allow Whether or not the extension should be allowed
228 * @param {Function=} callback
230 chrome
.developerPrivate
.allowIncognito = function(extensionId
, allow
, callback
) {};
233 * Loads a user-selected unpacked item.
234 * @param {Function=} callback
236 chrome
.developerPrivate
.loadUnpacked = function(callback
) {};
239 * Loads an extension / app.
240 * @param {Object} directory The directory to load the extension from.
241 * @param {Function} callback
243 chrome
.developerPrivate
.loadDirectory = function(directory
, callback
) {};
246 * Open Dialog to browse to an entry.
247 * @param {SelectType} selectType Select a file or a folder.
248 * @param {FileType} fileType Required file type. For example, pem type is for
249 * private key and load type is for an unpacked item.
250 * @param {Function} callback called with selected item's path.
252 chrome
.developerPrivate
.choosePath = function(selectType
, fileType
, callback
) {};
256 * @param {string} path
257 * @param {string=} privateKeyPath The path of the private key, if one is
259 * @param {number=} flags Special flags to apply to the loading process, if
261 * @param {Function=} callback called with the success result string.
263 chrome
.developerPrivate
.packDirectory = function(path
, privateKeyPath
, flags
, callback
) {};
266 * Returns true if the profile is managed.
267 * @param {Function} callback
269 chrome
.developerPrivate
.isProfileManaged = function(callback
) {};
272 * Reads and returns the contents of a file related to an extension which
274 * @param {RequestFileSourceProperties} properties
275 * @param {Function} callback
277 chrome
.developerPrivate
.requestFileSource = function(properties
, callback
) {};
280 * Open the developer tools to focus on a particular error.
281 * @param {OpenDevToolsProperties} properties
283 chrome
.developerPrivate
.openDevTools = function(properties
) {};
285 /** @type {!ChromeEvent} */
286 chrome
.developerPrivate
.onItemStateChanged
;