blob: 236a065ed5562ef0b006b482ab762c051279d777 [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[
{
"namespace":"webstorePrivate",
"description": "none",
"functions": [
{
"name": "install",
"nocompile": true,
"description": "Installs the extension corresponding to the given id",
"parameters": [
{
"name": "expected_id",
"type": "string",
"description": "The id of the extension to install."
},
{
"name": "callback",
"type": "function",
"optional": true,
"parameters": []
}
]
},
{
"name": "installBundle",
"description": "Initiates the install process for the given bundle of extensions.",
"parameters": [
{
"name": "details",
"description": "An array of extension details to be installed.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id of the extension to be installed.",
"minLength": 32,
"maxLength": 32
},
"manifest": {
"type": "string",
"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.",
"minLength": 1
},
"localizedName": {
"type": "string",
"description": "A string to use instead of the raw value of the 'name' key from manifest.json."
}
}
}
},
{
"name": "callback",
"type": "function",
"description": "Called when the install process completes. Upon failures, chrome.runtime.lastError will be set to 'user_canceled' or 'unknown_error'.",
"optional": true,
"parameters": []
}
]
},
{
"name": "beginInstallWithManifest3",
"description": "Initiates the install process for the given extension.",
"parameters": [
{
"name": "details",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The id of the extension to be installled.",
"minLength": 32,
"maxLength": 32
},
"manifest": {
"type": "string",
"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.",
"minLength": 1
},
"iconUrl": {
"type": "string",
"optional": true,
"desciption": "A URL for the image to display in the confirmation dialog"
},
"iconData": {
"type": "string",
"optional": true,
"description": "An icon as a base64-encoded image, displayed in a confirmation dialog."
},
"localizedName": {
"type": "string",
"optional": true,
"description": "A string to use instead of the raw value of the 'name' key from manifest.json."
},
"locale": {
"type": "string",
"optional": true,
"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."
},
"appInstallBubble": {
"type": "boolean",
"optional": true,
"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)."
},
"enableLauncher": {
"type": "boolean",
"optional": true,
"description": "A flag to cause the app launcher to be installed before installing the extension, if it isn't installed already."
},
"authuser": {
"type": "string",
"optional": true,
"description": "The authuser index to be included with CRX download requests in multi-login sessions."
}
},
"additionalProperties": { "type": "any" }
},
{
"name": "callback",
"type": "function",
"description": "Called when the user has either accepted/rejected the dialog, or some error occurred (such as invalid manifest or icon image data).",
"optional": true,
"parameters": [
{
"name": "result",
"type": "string",
"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', 'signin_failed', and 'already_installed'."
}
]
}
]
},
{
"name": "completeInstall",
"description": "",
"parameters": [
{
"name": "expected_id",
"type": "string",
"description": "The id of the extension to be installed. This should match a previous call to beginInstallWithManifest3."
},
{
"name": "callback",
"type": "function",
"optional": true,
"parameters": []
}
]
},
{
"name": "enableAppLauncher",
"description": "",
"parameters": [
{
"name": "callback",
"type": "function",
"optional": true,
"parameters": []
}
]
},
{
"name": "getBrowserLogin",
"description": "Returns the logged-in sync user login if there is one, or the empty string otherwise.",
"parameters": [
{
"name": "callback",
"type": "function",
"optional": false,
"parameters": [
{
"name": "info",
"type": "object",
"properties": {
"login": { "type": "string" }
}
}
]
}
]
},
{
"name": "getStoreLogin",
"description": "Returns the previous value set by setStoreLogin, or the empty string if there is none.",
"parameters": [
{
"name": "callback",
"type": "function",
"optional": false,
"parameters": [
{ "name": "login", "type": "string" }
]
}
]
},
{
"name": "setStoreLogin",
"description": "Sets a preference value with the store login.",
"parameters": [
{ "name": "login", "type": "string" },
{
"name": "callback",
"type": "function",
"optional": true,
"parameters": []
}
]
},
{
"name": "getWebGLStatus",
"description": "Invokes a callback that returns whether WebGL is blacklisted or not.",
"parameters": [
{
"name": "callback",
"type": "function",
"optional": false,
"parameters": [
{
"name": "webgl_status",
"type": "string",
"enum": ["webgl_allowed", "webgl_blocked"]
}
]
}
]
},
{
"name": "getIsLauncherEnabled",
"description": "Returns whether the apps launcher is enabled or not.",
"parameters": [
{
"name": "callback",
"type": "function",
"optional": false,
"parameters": [
{ "name": "is_enabled", "type": "boolean" }
]
}
]
},
{
"name": "isInIncognitoMode",
"description": "Returns whether the browser is in incognito mode or not.",
"parameters": [
{
"name": "callback",
"type": "function",
"optional": false,
"parameters": [
{ "name": "is_incognito", "type": "boolean" }
]
}
]
},
{
"name": "signIn",
"description": "Signs the user into Chrome.",
"parameters": [
{
"name": "continue_url",
"type": "string",
"description": "The continue URL to navigate to once sign-in completes."
},
{
"name": "callback",
"type": "function",
"description": "Called if the user is already signed in or if the sign-in method was invoked incorrectly (e.g. with an invalid continue URL), sign-in is unavailable (e.g. in Incognito), or the API was not called in response to a user gesture. Upon such a failure, chrome.runtime.lastError will be set to 'invalid_continue_url', 'signin_is_disallowed', 'signin_failed', 'merge_session_failed', or 'user_gesture_required'.",
"optional": true,
"parameters": []
}
]
},
{
"name": "getEphemeralAppsEnabled",
"description": "Returns whether the ephemeral apps feature is enabled.",
"parameters": [
{
"name": "callback",
"type": "function",
"optional": false,
"parameters": [
{ "name": "is_enabled", "type": "boolean" }
]
}
]
},
{
"name": "launchEphemeralApp",
"description": "Installs an app ephemerally in Chrome (if not already fully installed) and launches the app. A user gesture is required.",
"parameters": [
{
"name": "id",
"type": "string",
"description": "The extension id of the app to launch."
},
{
"name": "callback",
"type": "function",
"optional": true,
"parameters": [
{
"name": "result",
"type": "string",
"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"],
"description": "Whether an attempt to launch an app succeeded, or the reason for failure."
}
]
}
]
}
]
}
]