Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** @fileoverview Externs generated from namespace: developerPrivate */ | 5 /** @fileoverview Externs generated from namespace: developerPrivate */ |
| 6 | 6 |
| 7 // Note: hand-modified to change Array to !Array in ItemInfo typedef. | 7 // Note: hand-modified to change Array to !Array in ItemInfo typedef, and to |
| 8 // change enum types to strings. | |
| 8 | 9 |
| 9 /** | 10 /** |
| 10 * @typedef {{ | 11 * @typedef {{ |
| 11 * path: string, | 12 * path: string, |
| 12 * render_process_id: number, | 13 * render_process_id: number, |
| 13 * render_view_id: number, | 14 * render_view_id: number, |
| 14 * incognito: boolean, | 15 * incognito: boolean, |
| 15 * generatedBackgroundPage: boolean | 16 * generatedBackgroundPage: boolean |
| 16 * }} | 17 * }} |
| 17 */ | 18 */ |
| 18 var ItemInspectView; | 19 var ItemInspectView; |
| 19 | 20 |
| 20 /** | 21 /** |
| 21 * @typedef {{ | 22 * @typedef {{ |
| 22 * message: string | 23 * message: string |
| 23 * }} | 24 * }} |
| 24 */ | 25 */ |
| 25 var InstallWarning; | 26 var InstallWarning; |
| 26 | 27 |
| 27 /** | 28 /** |
| 28 * @typedef {{ | 29 * @typedef {{ |
| 29 * id: string, | 30 * id: string, |
| 30 * name: string, | 31 * name: string, |
| 31 * version: string, | 32 * version: string, |
| 32 * description: string, | 33 * description: string, |
| 33 * may_disable: boolean, | 34 * may_disable: boolean, |
| 34 * enabled: boolean, | 35 * enabled: boolean, |
| 35 * disabled_reason: (string|undefined), | 36 * disabled_reason: (string|undefined), |
| 36 * isApp: boolean, | 37 * isApp: boolean, |
| 37 * type: ItemType, | 38 * type: string, |
|
Dan Beam
2015/02/25 21:42:57
can we just add a @typedef (or @enum if this is on
Devlin
2015/02/25 22:15:43
Added @typedefs for them. We can't really use @enu
| |
| 38 * allow_activity: boolean, | 39 * allow_activity: boolean, |
| 39 * allow_file_access: boolean, | 40 * allow_file_access: boolean, |
| 40 * wants_file_access: boolean, | 41 * wants_file_access: boolean, |
| 41 * incognito_enabled: boolean, | 42 * incognito_enabled: boolean, |
| 42 * is_unpacked: boolean, | 43 * is_unpacked: boolean, |
| 43 * allow_reload: boolean, | 44 * allow_reload: boolean, |
| 44 * terminated: boolean, | 45 * terminated: boolean, |
| 45 * allow_incognito: boolean, | 46 * allow_incognito: boolean, |
| 46 * icon_url: string, | 47 * icon_url: string, |
| 47 * path: (string|undefined), | 48 * path: (string|undefined), |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 67 * }} | 68 * }} |
| 68 */ | 69 */ |
| 69 var InspectOptions; | 70 var InspectOptions; |
| 70 | 71 |
| 71 /** | 72 /** |
| 72 * @typedef {{ | 73 * @typedef {{ |
| 73 * message: string, | 74 * message: string, |
| 74 * item_path: string, | 75 * item_path: string, |
| 75 * pem_path: string, | 76 * pem_path: string, |
| 76 * override_flags: number, | 77 * override_flags: number, |
| 77 * status: PackStatus | 78 * status: string |
| 78 * }} | 79 * }} |
| 79 */ | 80 */ |
| 80 var PackDirectoryResponse; | 81 var PackDirectoryResponse; |
| 81 | 82 |
| 82 /** | 83 /** |
| 83 * @typedef {{ | 84 * @typedef {{ |
| 84 * name: string | 85 * name: string |
| 85 * }} | 86 * }} |
| 86 */ | 87 */ |
| 87 var ProjectInfo; | 88 var ProjectInfo; |
| 88 | 89 |
| 89 /** | 90 /** |
| 90 * @typedef {{ | 91 * @typedef {{ |
| 91 * event_type: EventType, | 92 * event_type: string, |
| 92 * item_id: string | 93 * item_id: string |
| 93 * }} | 94 * }} |
| 94 */ | 95 */ |
| 95 var EventData; | 96 var EventData; |
| 96 | 97 |
| 97 /** | 98 /** |
| 98 * @const | 99 * @const |
| 99 */ | 100 */ |
| 100 chrome.developerPrivate = {}; | 101 chrome.developerPrivate = {}; |
| 101 | 102 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 | 168 |
| 168 /** | 169 /** |
| 169 * Loads an extension / app from a given |directory| | 170 * Loads an extension / app from a given |directory| |
| 170 * @param {Object} directory | 171 * @param {Object} directory |
| 171 * @param {Function} callback | 172 * @param {Function} callback |
| 172 */ | 173 */ |
| 173 chrome.developerPrivate.loadDirectory = function(directory, callback) {}; | 174 chrome.developerPrivate.loadDirectory = function(directory, callback) {}; |
| 174 | 175 |
| 175 /** | 176 /** |
| 176 * Open Dialog to browse to an entry. | 177 * Open Dialog to browse to an entry. |
| 177 * @param {SelectType} select_type Select a file or a folder. | 178 * @param {string} select_type Select a file or a folder. |
| 178 * @param {FileType} file_type Required file type. For Example pem type is for | 179 * @param {string} file_type Required file type. For Example pem type is for |
| 179 * private key and load type is for an unpacked item. | 180 * private key and load type is for an unpacked item. |
| 180 * @param {Function} callback called with selected item's path. | 181 * @param {Function} callback called with selected item's path. |
| 181 */ | 182 */ |
| 182 chrome.developerPrivate.choosePath = function(select_type, file_type, callback) {}; | 183 chrome.developerPrivate.choosePath = function(select_type, file_type, callback) {}; |
| 183 | 184 |
| 184 /** | 185 /** |
| 185 * Pack an item with given |path| and |private_key_path| | 186 * Pack an item with given |path| and |private_key_path| |
| 186 * @param {string} path | 187 * @param {string} path |
| 187 * @param {string} private_key_path | 188 * @param {string} private_key_path |
| 188 * @param {number} flags | 189 * @param {number} flags |
| 189 * @param {Function} callback called with the success result string. | 190 * @param {Function} callback called with the success result string. |
| 190 */ | 191 */ |
| 191 chrome.developerPrivate.packDirectory = function(path, private_key_path, flags, callback) {}; | 192 chrome.developerPrivate.packDirectory = function(path, private_key_path, flags, callback) {}; |
| 192 | 193 |
| 193 /** | 194 /** |
| 194 * Returns true if the profile is managed. | 195 * Returns true if the profile is managed. |
| 195 * @param {Function} callback | 196 * @param {Function} callback |
| 196 */ | 197 */ |
| 197 chrome.developerPrivate.isProfileManaged = function(callback) {}; | 198 chrome.developerPrivate.isProfileManaged = function(callback) {}; |
| 198 | 199 |
| 200 /** | |
| 201 * Reads and returns the contents of a file related to an extension which | |
| 202 * caused an error. | |
| 203 * @param {?} dict | |
| 204 * @param {Function} callback | |
| 205 */ | |
| 206 chrome.developerPrivate.requestFileSource = function(dict, callback) {}; | |
|
Devlin
2015/02/25 20:29:39
I didn't think we needed these, because closure co
| |
| 207 | |
| 208 /** | |
| 209 * Open the developer tools to focus on a particular error. | |
| 210 * @param {?} dict | |
| 211 */ | |
| 212 chrome.developerPrivate.openDevTools = function(dict) {}; | |
| 213 | |
| 199 /** @type {!ChromeEvent} */ | 214 /** @type {!ChromeEvent} */ |
| 200 chrome.developerPrivate.onItemStateChanged; | 215 chrome.developerPrivate.onItemStateChanged; |
| OLD | NEW |