| 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 [ |
| 6 { |
| 7 "namespace":"dashboardPrivate", |
| 8 "description": "none", |
| 9 "types": [ |
| 10 { |
| 11 "id": "Result", |
| 12 "type": "string", |
| 13 "enum": [{ |
| 14 "name": "", |
| 15 "description": "Empty string, used to indicate success by showPermissi
onPromptForDelegatedInstall" |
| 16 }, { |
| 17 "name": "success", |
| 18 "description": "Used to indicate success by showPermissionPromptForDel
egatedBundleInstall" |
| 19 }, { |
| 20 "name": "unknown_error", |
| 21 "description": "An unknown error occured" |
| 22 }, { |
| 23 "name": "user_cancelled", |
| 24 "description": "The user canceled the operation" |
| 25 }, { |
| 26 "name": "invalid_id", |
| 27 "description": "An invalid Chrome Web Store item ID was provided" |
| 28 }, { |
| 29 "name": "manifest_error", |
| 30 "description": "Parsing of the extension manifest failed" |
| 31 }, { |
| 32 "name": "icon_error", |
| 33 "description": "Failed to retrieve the extension's icon from the Web S
tore, or the icon was invalid" |
| 34 }, { |
| 35 "name": "invalid_icon_url", |
| 36 "description": "An invalid icon URL was provided" |
| 37 }], |
| 38 "description": "Whether the API call succeeded, or the reason for failur
e." |
| 39 } |
| 40 ], |
| 41 "functions": [ |
| 42 { |
| 43 "name": "showPermissionPromptForDelegatedInstall", |
| 44 "description": "Shows a permission prompt for the given extension, for i
nstalling to a different account.", |
| 45 "parameters": [ |
| 46 { |
| 47 "name": "details", |
| 48 "type": "object", |
| 49 "properties": { |
| 50 "id": { |
| 51 "type": "string", |
| 52 "description": "The id of the extension to be installled.", |
| 53 "minLength": 32, |
| 54 "maxLength": 32 |
| 55 }, |
| 56 "manifest": { |
| 57 "type": "string", |
| 58 "description": "A string with the contents of the extension's ma
nifest.json file. During the install process, the browser will check that the do
wnloaded extension's manifest matches what was passed in here.", |
| 59 "minLength": 1 |
| 60 }, |
| 61 "delegatedUser": { |
| 62 "type": "string", |
| 63 "description": "The display name of the user for whom the extens
ion should be installed." |
| 64 }, |
| 65 "iconUrl": { |
| 66 "type": "string", |
| 67 "optional": true, |
| 68 "desciption": "A URL for the image to display in the confirmatio
n dialog" |
| 69 }, |
| 70 "iconData": { |
| 71 "type": "string", |
| 72 "optional": true, |
| 73 "description": "An icon as a base64-encoded image, displayed in
a confirmation dialog." |
| 74 }, |
| 75 "localizedName": { |
| 76 "type": "string", |
| 77 "optional": true, |
| 78 "description": "A string to use instead of the raw value of the
'name' key from manifest.json." |
| 79 } |
| 80 } |
| 81 }, |
| 82 { |
| 83 "name": "callback", |
| 84 "type": "function", |
| 85 "description": "Called when the user has either accepted/rejected th
e dialog, or some error occurred (such as invalid manifest or icon image data)."
, |
| 86 "optional": true, |
| 87 "parameters": [ |
| 88 { |
| 89 "name": "result", |
| 90 "$ref": "Result", |
| 91 "description": "A string result code, which will be empty upon s
uccess. The possible values in the case of errors include 'unknown_error', 'user
_cancelled', 'manifest_error', 'icon_error', 'invalid_id', and 'invalid_icon_url
'." |
| 92 } |
| 93 ] |
| 94 } |
| 95 ] |
| 96 }, |
| 97 { |
| 98 "name": "showPermissionPromptForDelegatedBundleInstall", |
| 99 "description": "Shows a permission prompt for the given bundle, for inst
alling to a different account.", |
| 100 "parameters": [ |
| 101 { |
| 102 "name": "details", |
| 103 "type": "object", |
| 104 "properties": { |
| 105 "localizedName": { |
| 106 "type": "string", |
| 107 "description": "A title to use for display in a confirmation dia
log." |
| 108 }, |
| 109 "delegatedUser": { |
| 110 "type": "string", |
| 111 "description": "The display name of the user for whom the extens
ion should be installed." |
| 112 }, |
| 113 "iconUrl": { |
| 114 "type": "string", |
| 115 "optional": true, |
| 116 "desciption": "A URL for the image to display in the confirmatio
n dialog" |
| 117 } |
| 118 }, |
| 119 "additionalProperties": { "type": "any" } |
| 120 }, |
| 121 { |
| 122 "name": "contents", |
| 123 "description": "An array of extension details to be installed.", |
| 124 "type": "array", |
| 125 "items": { |
| 126 "type": "object", |
| 127 "properties": { |
| 128 "id": { |
| 129 "type": "string", |
| 130 "description": "The id of the extension to be installed.", |
| 131 "minLength": 32, |
| 132 "maxLength": 32 |
| 133 }, |
| 134 "manifest": { |
| 135 "type": "string", |
| 136 "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.", |
| 137 "minLength": 1 |
| 138 }, |
| 139 "iconUrl": { |
| 140 "type": "string", |
| 141 "optional": true, |
| 142 "desciption": "A URL for the image to display in the confirmat
ion dialog" |
| 143 }, |
| 144 "localizedName": { |
| 145 "type": "string", |
| 146 "description": "A string to use instead of the raw value of th
e 'name' key from manifest.json." |
| 147 } |
| 148 } |
| 149 } |
| 150 }, |
| 151 { |
| 152 "name": "callback", |
| 153 "type": "function", |
| 154 "description": "Called when the install process completes. Upon fail
ures, chrome.runtime.lastError will be set to 'Invalid bundle', 'Invalid icon ur
l', or 'User cancelled install'.", |
| 155 "optional": true, |
| 156 "parameters": [] |
| 157 } |
| 158 ] |
| 159 } |
| 160 ] |
| 161 } |
| 162 ] |
| OLD | NEW |