OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 /** @fileoverview Externs generated from namespace: developerPrivate */ |
| 6 |
| 7 // Note: hand-modified to change Array to !Array in ItemInfo typedef. |
| 8 |
| 9 /** |
| 10 * @typedef {{ |
| 11 * path: string, |
| 12 * render_process_id: number, |
| 13 * render_view_id: number, |
| 14 * incognito: boolean, |
| 15 * generatedBackgroundPage: boolean |
| 16 * }} |
| 17 */ |
| 18 var ItemInspectView; |
| 19 |
| 20 /** |
| 21 * @typedef {{ |
| 22 * message: string |
| 23 * }} |
| 24 */ |
| 25 var InstallWarning; |
| 26 |
| 27 /** |
| 28 * @typedef {{ |
| 29 * id: string, |
| 30 * name: string, |
| 31 * version: string, |
| 32 * description: string, |
| 33 * may_disable: boolean, |
| 34 * enabled: boolean, |
| 35 * disabled_reason: (string|undefined), |
| 36 * isApp: boolean, |
| 37 * type: ItemType, |
| 38 * allow_activity: boolean, |
| 39 * allow_file_access: boolean, |
| 40 * wants_file_access: boolean, |
| 41 * incognito_enabled: boolean, |
| 42 * is_unpacked: boolean, |
| 43 * allow_reload: boolean, |
| 44 * terminated: boolean, |
| 45 * allow_incognito: boolean, |
| 46 * icon_url: string, |
| 47 * path: (string|undefined), |
| 48 * options_url: (string|undefined), |
| 49 * app_launch_url: (string|undefined), |
| 50 * homepage_url: (string|undefined), |
| 51 * update_url: (string|undefined), |
| 52 * install_warnings: !Array, |
| 53 * manifest_errors: !Array, |
| 54 * runtime_errors: !Array, |
| 55 * offline_enabled: boolean, |
| 56 * views: !Array |
| 57 * }} |
| 58 */ |
| 59 var ItemInfo; |
| 60 |
| 61 /** |
| 62 * @typedef {{ |
| 63 * extension_id: string, |
| 64 * render_process_id: string, |
| 65 * render_view_id: string, |
| 66 * incognito: boolean |
| 67 * }} |
| 68 */ |
| 69 var InspectOptions; |
| 70 |
| 71 /** |
| 72 * @typedef {{ |
| 73 * message: string, |
| 74 * item_path: string, |
| 75 * pem_path: string, |
| 76 * override_flags: number, |
| 77 * status: PackStatus |
| 78 * }} |
| 79 */ |
| 80 var PackDirectoryResponse; |
| 81 |
| 82 /** |
| 83 * @typedef {{ |
| 84 * name: string |
| 85 * }} |
| 86 */ |
| 87 var ProjectInfo; |
| 88 |
| 89 /** |
| 90 * @typedef {{ |
| 91 * event_type: EventType, |
| 92 * item_id: string |
| 93 * }} |
| 94 */ |
| 95 var EventData; |
| 96 |
| 97 /** |
| 98 * @const |
| 99 */ |
| 100 chrome.developerPrivate = {}; |
| 101 |
| 102 /** |
| 103 * Runs auto update for extensions and apps immediately. |
| 104 * @param {Function} callback Called with the boolean result, true if |
| 105 * autoUpdate is successful. |
| 106 */ |
| 107 chrome.developerPrivate.autoUpdate = function(callback) {}; |
| 108 |
| 109 /** |
| 110 * Returns information of all the extensions and apps installed. |
| 111 * @param {boolean} include_disabled include disabled items. |
| 112 * @param {boolean} include_terminated include terminated items. |
| 113 * @param {Function} callback Called with items info. |
| 114 */ |
| 115 chrome.developerPrivate.getItemsInfo = function(include_disabled, include_termin
ated, callback) {}; |
| 116 |
| 117 /** |
| 118 * Opens a permissions dialog for given |itemId|. |
| 119 * @param {string} itemId |
| 120 * @param {Function=} callback |
| 121 */ |
| 122 chrome.developerPrivate.showPermissionsDialog = function(itemId, callback) {}; |
| 123 |
| 124 /** |
| 125 * Opens an inspect window for given |options| |
| 126 * @param {InspectOptions} options |
| 127 * @param {Function=} callback |
| 128 */ |
| 129 chrome.developerPrivate.inspect = function(options, callback) {}; |
| 130 |
| 131 /** |
| 132 * Enable / Disable file access for a given |item_id| |
| 133 * @param {string} item_id |
| 134 * @param {boolean} allow |
| 135 * @param {Function=} callback |
| 136 */ |
| 137 chrome.developerPrivate.allowFileAccess = function(item_id, allow, callback) {}; |
| 138 |
| 139 /** |
| 140 * Reloads a given item with |itemId|. |
| 141 * @param {string} itemId |
| 142 * @param {Function=} callback |
| 143 */ |
| 144 chrome.developerPrivate.reload = function(itemId, callback) {}; |
| 145 |
| 146 /** |
| 147 * Enable / Disable a given item with id |itemId|. |
| 148 * @param {string} itemId |
| 149 * @param {boolean} enable |
| 150 * @param {Function=} callback |
| 151 */ |
| 152 chrome.developerPrivate.enable = function(itemId, enable, callback) {}; |
| 153 |
| 154 /** |
| 155 * Allow / Disallow item with |item_id| in incognito mode. |
| 156 * @param {string} item_id |
| 157 * @param {boolean} allow |
| 158 * @param {Function} callback |
| 159 */ |
| 160 chrome.developerPrivate.allowIncognito = function(item_id, allow, callback) {}; |
| 161 |
| 162 /** |
| 163 * Load a user selected unpacked item |
| 164 * @param {Function=} callback |
| 165 */ |
| 166 chrome.developerPrivate.loadUnpacked = function(callback) {}; |
| 167 |
| 168 /** |
| 169 * Loads an extension / app from a given |directory| |
| 170 * @param {Object} directory |
| 171 * @param {Function} callback |
| 172 */ |
| 173 chrome.developerPrivate.loadDirectory = function(directory, callback) {}; |
| 174 |
| 175 /** |
| 176 * Open Dialog to browse to an entry. |
| 177 * @param {SelectType} select_type Select a file or a folder. |
| 178 * @param {FileType} file_type Required file type. For Example pem type is for |
| 179 * private key and load type is for an unpacked item. |
| 180 * @param {Function} callback called with selected item's path. |
| 181 */ |
| 182 chrome.developerPrivate.choosePath = function(select_type, file_type, callback)
{}; |
| 183 |
| 184 /** |
| 185 * Pack an item with given |path| and |private_key_path| |
| 186 * @param {string} path |
| 187 * @param {string} private_key_path |
| 188 * @param {number} flags |
| 189 * @param {Function} callback called with the success result string. |
| 190 */ |
| 191 chrome.developerPrivate.packDirectory = function(path, private_key_path, flags,
callback) {}; |
| 192 |
| 193 /** |
| 194 * Returns true if the profile is managed. |
| 195 * @param {Function} callback |
| 196 */ |
| 197 chrome.developerPrivate.isProfileManaged = function(callback) {}; |
| 198 |
| 199 /** @type {!ChromeEvent} */ |
| 200 chrome.developerPrivate.onItemStateChanged; |
OLD | NEW |