OLD | NEW |
| (Empty) |
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 "nodoc": "true", | |
9 "functions": [ | |
10 { | |
11 "name": "install", | |
12 "description": "Installs the extension corresponding to the given id", | |
13 "parameters": [ | |
14 { | |
15 "name": "expected_id", | |
16 "type": "string", | |
17 "description": "The id of the extension to install." | |
18 }, | |
19 { | |
20 "name": "callback", | |
21 "type": "function", | |
22 "optional": "true", | |
23 "parameters": [] | |
24 } | |
25 ] | |
26 }, | |
27 { | |
28 "name": "installBundle", | |
29 "description": "Initiates the install process for the given bundle of ex
tensions.", | |
30 "parameters": [ | |
31 { | |
32 "name": "details", | |
33 "description": "An array of extension details to be installed.", | |
34 "type": "array", | |
35 "items": { | |
36 "type": "object", | |
37 "properties": { | |
38 "id": { | |
39 "type": "string", | |
40 "description": "The id of the extension to be installed.", | |
41 "minLength": 32, | |
42 "maxLength": 32 | |
43 }, | |
44 "manifest": { | |
45 "type": "string", | |
46 "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.", | |
47 "minLength": 1 | |
48 }, | |
49 "localizedName": { | |
50 "type": "string", | |
51 "description": "A string to use instead of the raw value of th
e 'name' key from manifest.json." | |
52 } | |
53 } | |
54 } | |
55 }, | |
56 { | |
57 "name": "callback", | |
58 "type": "function", | |
59 "description": "Called when the install process completes. Upon fail
ures, chrome.extension.lastError will be set to 'user_canceled' or 'unknown_erro
r'.", | |
60 "optional": "true", | |
61 "parameters": [] | |
62 } | |
63 ] | |
64 }, | |
65 { | |
66 "name": "beginInstallWithManifest3", | |
67 "description": "Initiates the install process for the given extension.", | |
68 "parameters": [ | |
69 { | |
70 "name": "details", | |
71 "type": "object", | |
72 "properties": { | |
73 "id": { | |
74 "type": "string", | |
75 "description": "The id of the extension to be installled.", | |
76 "minLength": 32, | |
77 "maxLength": 32 | |
78 }, | |
79 "manifest": { | |
80 "type": "string", | |
81 "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.", | |
82 "minLength": 1 | |
83 }, | |
84 "iconUrl": { | |
85 "type": "string", | |
86 "optional": true, | |
87 "desciption": "A URL for the image to display in the confirmatio
n dialog" | |
88 }, | |
89 "iconData": { | |
90 "type": "string", | |
91 "optional": true, | |
92 "description": "An icon as a base64-encoded image, displayed in
a confirmation dialog." | |
93 }, | |
94 "localizedName": { | |
95 "type": "string", | |
96 "optional": true, | |
97 "description": "A string to use instead of the raw value of the
'name' key from manifest.json." | |
98 }, | |
99 "locale": { | |
100 "type": "string", | |
101 "optional": true, | |
102 "description": "The name of the locale used for generating local
izedName. This should be the name of one of the directories in the _locales fold
er of the extension, or the default_locale setting from the manifest." | |
103 }, | |
104 "appInstallBubble": { | |
105 "type": "boolean", | |
106 "optional": true, | |
107 "description": "A flag to change the UI we show when an app is i
nstalled - 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)." | |
108 } | |
109 }, | |
110 "additionalProperties": { "type": "any" } | |
111 }, | |
112 { | |
113 "name": "callback", | |
114 "type": "function", | |
115 "description": "Called when the user has either accepted/rejected th
e dialog, or some error occurred (such as invalid manifest or icon image data)."
, | |
116 "optional": "true", | |
117 "parameters": [ | |
118 { | |
119 "name": "result", | |
120 "type": "string", | |
121 "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', 'permission_denied',
and 'invalid_icon_url'." | |
122 } | |
123 ] | |
124 } | |
125 ] | |
126 | |
127 }, | |
128 { | |
129 "name": "completeInstall", | |
130 "description": "", | |
131 "parameters": [ | |
132 { | |
133 "name": "expected_id", | |
134 "type": "string", | |
135 "description": "The id of the extension to be installed. This should
match a previous call to beginInstallWithManifest3." | |
136 }, | |
137 { | |
138 "name": "callback", | |
139 "type": "function", | |
140 "optional": "true", | |
141 "parameters": [] | |
142 } | |
143 ] | |
144 }, | |
145 { | |
146 "name": "silentlyInstall", | |
147 "description": "Silently installs the specified extension, which must al
ready be whitelisted in Chrome.", | |
148 "parameters": [ | |
149 { | |
150 "name": "details", | |
151 "type": "object", | |
152 "properties": { | |
153 "id": { | |
154 "type": "string", | |
155 "description": "The id of the extension to be installled.", | |
156 "minLength": 32, | |
157 "maxLength": 32 | |
158 }, | |
159 "manifest": { | |
160 "type": "string", | |
161 "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.", | |
162 "minLength": 1 | |
163 } | |
164 } | |
165 }, | |
166 { | |
167 "name": "callback", | |
168 "type": "function", | |
169 "description": "Called when the extension installation has completed
. chrome.extension.lastError may be set if the extension install failed.", | |
170 "optional": "true", | |
171 "parameters": [] | |
172 } | |
173 ] | |
174 }, | |
175 { | |
176 "name": "getBrowserLogin", | |
177 "description": "Returns the logged-in sync user login if there is one, o
r the empty string otherwise.", | |
178 "parameters": [ | |
179 { | |
180 "name": "callback", | |
181 "type": "function", | |
182 "optional": "false", | |
183 "parameters": [ | |
184 { | |
185 "name": "info", | |
186 "type": "object", | |
187 "properties": { | |
188 "login": { "type": "string" }, | |
189 "token": { "type": "string", "optional": true } | |
190 } | |
191 } | |
192 ] | |
193 } | |
194 ] | |
195 }, | |
196 { | |
197 "name": "getStoreLogin", | |
198 "description": "Returns the previous value set by setStoreLogin, or the
empty string if there is none.", | |
199 "parameters": [ | |
200 { | |
201 "name": "callback", | |
202 "type": "function", | |
203 "optional": "false", | |
204 "parameters": [ | |
205 { "name": "login", "type": "string" } | |
206 ] | |
207 } | |
208 ] | |
209 }, | |
210 { | |
211 "name": "setStoreLogin", | |
212 "description": "Sets a preference value with the store login.", | |
213 "parameters": [ | |
214 { "name": "login", "type": "string" }, | |
215 { | |
216 "name": "callback", | |
217 "type": "function", | |
218 "optional": "true", | |
219 "parameters": [] | |
220 } | |
221 ] | |
222 }, | |
223 { | |
224 "name": "promptBrowserLogin", | |
225 "description": "Causes the browser to bring up the browser login UI.", | |
226 "parameters": [ | |
227 { | |
228 "name": "preferred_email", | |
229 "type": "string", | |
230 "description": "The email address to use to pre-populate the login d
ialog (can be an empty string)." | |
231 }, | |
232 { | |
233 "name": "callback", | |
234 "type": "function", | |
235 "optional": "true", | |
236 "parameters": [ | |
237 { | |
238 "name": "info", | |
239 "type": "object", | |
240 "properties": { | |
241 "login": { "type": "string", "optional": true }, | |
242 "token": { "type": "string", "optional": true } | |
243 } | |
244 } | |
245 ] | |
246 } | |
247 ] | |
248 }, | |
249 { | |
250 "name": "getWebGLStatus", | |
251 "description": "Invokes a callback that returns whether WebGL is blackli
sted or not.", | |
252 "parameters": [ | |
253 { | |
254 "name": "callback", | |
255 "type": "function", | |
256 "optional": "false", | |
257 "parameters": [ | |
258 { | |
259 "name": "webgl_status", | |
260 "type": "string", | |
261 "enum": ["webgl_allowed", "webgl_blocked"] | |
262 } | |
263 ] | |
264 } | |
265 ] | |
266 } | |
267 ] | |
268 } | |
269 ] | |
OLD | NEW |