1 // Copyright (c) 2012 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 [ 6 { 7 "namespace":"webstorePrivate", 8 "description": "none", 9 "functions": [ 10 { 11 "name": "install", 12 "nocompile": true, 13 "description": "Installs the extension corresponding to the given id", 14 "parameters": [ 15 { 16 "name": "expected_id", 17 "type": "string", 18 "description": "The id of the extension to install." 19 }, 20 { 21 "name": "callback", 22 "type": "function", 23 "optional": true, 24 "parameters": [] 25 } 26 ] 27 }, 28 { 29 "name": "installBundle", 30 "description": "Initiates the install process for the given bundle of extensions.", 31 "parameters": [ 32 { 33 "name": "details", 34 "description": "An array of extension details to be installed.", 35 "type": "array", 36 "items": { 37 "type": "object", 38 "properties": { 39 "id": { 40 "type": "string", 41 "description": "The id of the extension to be installed.", 42 "minLength": 32, 43 "maxLength": 32 44 }, 45 "manifest": { 46 "type": "string", 47 "description": "A string with the contents of the extension's manifest.json file. During the install process, the browser will check that the downloaded extension's manifest matches what was passed in here.", 48 "minLength": 1 49 }, 50 "localizedName": { 51 "type": "string", 52 "description": "A string to use instead of the raw value of the 'name' key from manifest.json." 53 } 54 } 55 } 56 }, 57 { 58 "name": "callback", 59 "type": "function", 60 "description": "Called when the install process completes. Upon failures, chrome.runtime.lastError will be set to 'user_canceled' or 'unknown_error'.", 61 "optional": true, 62 "parameters": [] 63 } 64 ] 65 }, 66 { 67 "name": "beginInstallWithManifest3", 68 "description": "Initiates the install process for the given extension.", 69 "parameters": [ 70 { 71 "name": "details", 72 "type": "object", 73 "properties": { 74 "id": { 75 "type": "string", 76 "description": "The id of the extension to be installled.", 77 "minLength": 32, 78 "maxLength": 32 79 }, 80 "manifest": { 81 "type": "string", 82 "description": "A string with the contents of the extension's manifest.json file. During the install process, the browser will check that the downloaded extension's manifest matches what was passed in here.", 83 "minLength": 1 84 }, 85 "iconUrl": { 86 "type": "string", 87 "optional": true, 88 "desciption": "A URL for the image to display in the confirmation dialog" 89 }, 90 "iconData": { 91 "type": "string", 92 "optional": true, 93 "description": "An icon as a base64-encoded image, displayed in a confirmation dialog." 94 }, 95 "localizedName": { 96 "type": "string", 97 "optional": true, 98 "description": "A string to use instead of the raw value of the 'name' key from manifest.json." 99 }, 100 "locale": { 101 "type": "string", 102 "optional": true, 103 "description": "The name of the locale used for generating localizedName. This should be the name of one of the directories in the _locales folder of the extension, or the default_locale setting from the manifest." 104 }, 105 "appInstallBubble": { 106 "type": "boolean", 107 "optional": true, 108 "description": "A flag to change the UI we show when an app is installed - a value of true means to show a bubble pointing at the new tab button (instead of the default behavior of opening the new tab page and animating the app icon)." 109 }, 110 "enableLauncher": { 111 "type": "boolean", 112 "optional": true, 113 "description": "A flag to cause the app launcher to be installed before installing the extension, if it isn't installed already." 114 }, 115 "authuser": { 116 "type": "string", 117 "optional": true, 118 "description": "The authuser index to be included with CRX download requests in multi-login sessions." 119 } 120 }, 121 "additionalProperties": { "type": "any" } 122 }, 123 { 124 "name": "callback", 125 "type": "function", 126 "description": "Called when the user has either accepted/rejected the dialog, or some error occurred (such as invalid manifest or icon image data).", 127 "optional": true, 128 "parameters": [ 129 { 130 "name": "result", 131 "type": "string", 132 "description": "A string result code, which will be empty upon success. The possible values in the case of errors include 'unknown_error', 'user_cancelled', 'manifest_error', 'icon_error', 'invalid_id', 'permission_denied', 'invalid_icon_url' and 'already_installed'." 133 } 134 ] 135 } 136 ] 137 138 }, 139 { 140 "name": "completeInstall", 141 "description": "", 142 "parameters": [ 143 { 144 "name": "expected_id", 145 "type": "string", 146 "description": "The id of the extension to be installed. This should match a previous call to beginInstallWithManifest3." 147 }, 148 { 149 "name": "callback", 150 "type": "function", 151 "optional": true, 152 "parameters": [] 153 } 154 ] 155 }, 156 { 157 "name": "enableAppLauncher", 158 "description": "", 159 "parameters": [ 160 { 161 "name": "callback", 162 "type": "function", 163 "optional": true, 164 "parameters": [] 165 } 166 ] 167 }, 168 { 169 "name": "getBrowserLogin", 170 "description": "Returns the logged-in sync user login if there is one, or the empty string otherwise.", 171 "parameters": [ 172 { 173 "name": "callback", 174 "type": "function", 175 "optional": false, 176 "parameters": [ 177 { 178 "name": "info", 179 "type": "object", 180 "properties": { 181 "login": { "type": "string" } 182 } 183 } 184 ] 185 } 186 ] 187 }, 188 { 189 "name": "getStoreLogin", 190 "description": "Returns the previous value set by setStoreLogin, or the empty string if there is none.", 191 "parameters": [ 192 { 193 "name": "callback", 194 "type": "function", 195 "optional": false, 196 "parameters": [ 197 { "name": "login", "type": "string" } 198 ] 199 } 200 ] 201 }, 202 { 203 "name": "setStoreLogin", 204 "description": "Sets a preference value with the store login.", 205 "parameters": [ 206 { "name": "login", "type": "string" }, 207 { 208 "name": "callback", 209 "type": "function", 210 "optional": true, 211 "parameters": [] 212 } 213 ] 214 }, 215 { 216 "name": "getWebGLStatus", 217 "description": "Invokes a callback that returns whether WebGL is blacklisted or not.", 218 "parameters": [ 219 { 220 "name": "callback", 221 "type": "function", 222 "optional": false, 223 "parameters": [ 224 { 225 "name": "webgl_status", 226 "type": "string", 227 "enum": ["webgl_allowed", "webgl_blocked"] 228 } 229 ] 230 } 231 ] 232 }, 233 { 234 "name": "getIsLauncherEnabled", 235 "description": "Returns whether the apps launcher is enabled or not.", 236 "parameters": [ 237 { 238 "name": "callback", 239 "type": "function", 240 "optional": false, 241 "parameters": [ 242 { "name": "is_enabled", "type": "boolean" } 243 ] 244 } 245 ] 246 }, 247 { 248 "name": "isInIncognitoMode", 249 "description": "Returns whether the browser is in incognito mode or not.", 250 "parameters": [ 251 { 252 "name": "callback", 253 "type": "function", 254 "optional": false, 255 "parameters": [ 256 { "name": "is_incognito", "type": "boolean" } 257 ] 258 } 259 ] 260 }, 261 { 262 "name": "getEphemeralAppsEnabled", 263 "description": "Returns whether the ephemeral apps feature is enabled.", 264 "parameters": [ 265 { 266 "name": "callback", 267 "type": "function", 268 "optional": false, 269 "parameters": [ 270 { "name": "is_enabled", "type": "boolean" } 271 ] 272 } 273 ] 274 }, 275 { 276 "name": "launchEphemeralApp", 277 "description": "Installs an app ephemerally in Chrome (if not already fully installed) and launches the app. A user gesture is required.", 278 "parameters": [ 279 { 280 "name": "id", 281 "type": "string", 282 "description": "The extension id of the app to launch." 283 }, 284 { 285 "name": "callback", 286 "type": "function", 287 "optional": true, 288 "parameters": [ 289 { 290 "name": "result", 291 "type": "string", 292 "enum": ["success", "user_gesture_required", "unknown_error", "feature_disabled", "unsupported_extension_type", "missing_dependencies", "install_error", "user_cancelled", "invalid_id", "blacklisted", "blocked_by_policy", "install_in_progress", "launch_in_progress"], 293 "description": "Whether an attempt to launch an app succeeded, or the reason for failure." 294 } 295 ] 296 } 297 ] 298 } 299 ] 300 } 301 ] 302