Fix broken path in extensions/common/PRESUBMIT.py
[chromium-blink-merge.git] / chrome / common / extensions / api / webstore_private.json
blobaa6642c139ef2cb6953b95496ac5cd59737b56df
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.
6   {
7     "namespace":"webstorePrivate",
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 beginInstallWithManifest3"
16         }, {
17           "name": "success",
18           "description": "Installation was successful"
19         }, {
20           "name": "user_gesture_required",
21           "description": "Function was called without a user gesture"
22         }, {
23           "name": "unknown_error",
24           "description": "An unknown error occured"
25         }, {
26           "name": "feature_disabled",
27           "description": "The requested feature is not available"
28         }, {
29           "name": "unsupported_extension_type",
30           "description": "The requested feature is not availabe for this type of extension"
31         }, {
32           "name": "missing_dependencies",
33           "description": "There were unsatisfied dependencies, such as shared modules"
34         }, {
35           "name": "install_error",
36           "description": "An error occured during installation"
37         }, {
38           "name": "user_cancelled",
39           "description": "The user canceled the operation"
40         }, {
41           "name": "invalid_id",
42           "description": "An invalid Chrome Web Store item ID was provided"
43         }, {
44           "name": "blacklisted",
45           "description": "The given extension is blacklisted"
46         }, {
47           "name": "blocked_by_policy",
48           "description": "The given extension is blocked by management policy"
49         }, {
50           "name": "install_in_progress",
51           "description": "An installation of the same extension is already in progress"
52         }, {
53           "name": "launch_in_progress",
54           "description": "A launch of the same extension is already in progress"
55         }, {
56           "name": "manifest_error",
57           "description": "Parsing of the extension manifest failed"
58         }, {
59           "name": "icon_error",
60           "description": "Failed to retrieve the extension's icon from the Web Store, or the icon was invalid"
61         }, {
62           "name": "invalid_icon_url",
63           "description": "An invalid icon URL was provided"
64         }, {
65           "name": "already_installed",
66           "description": "The extension is already installed"
67         }],
68         "description": "Whether the API call succeeded, or the reason for failure."
69       },
70       {
71         "id": "WebGlStatus",
72         "type": "string",
73         "enum": ["webgl_allowed", "webgl_blocked"]
74       }
75     ],
76     "functions": [
77       {
78         "name": "install",
79         "nocompile": true,
80         "description": "Installs the extension corresponding to the given id",
81         "parameters": [
82           {
83             "name": "expected_id",
84             "type": "string",
85             "description": "The id of the extension to install."
86           },
87           {
88             "name": "callback",
89             "type": "function",
90             "optional": true,
91             "parameters": []
92           }
93         ]
94       },
95       {
96         "name": "beginInstallWithManifest3",
97         "description": "Initiates the install process for the given extension.",
98         "parameters": [
99           {
100             "name": "details",
101             "type": "object",
102             "properties": {
103               "id": {
104                 "type": "string",
105                 "description": "The id of the extension to be installed.",
106                 "minLength": 32,
107                 "maxLength": 32
108               },
109               "manifest": {
110                 "type": "string",
111                 "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.",
112                 "minLength": 1
113               },
114               "iconUrl": {
115                 "type": "string",
116                 "optional": true,
117                 "desciption": "A URL for the image to display in the confirmation dialog"
118               },
119               "iconData": {
120                 "type": "string",
121                 "optional": true,
122                 "description": "An icon as a base64-encoded image, displayed in a confirmation dialog."
123               },
124               "localizedName": {
125                 "type": "string",
126                 "optional": true,
127                 "description": "A string to use instead of the raw value of the 'name' key from manifest.json."
128               },
129               "locale": {
130                 "type": "string",
131                 "optional": true,
132                 "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."
133               },
134               "appInstallBubble": {
135                 "type": "boolean",
136                 "optional": true,
137                 "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)."
138               },
139               "enableLauncher": {
140                 "type": "boolean",
141                 "optional": true,
142                 "description": "A flag to cause the app launcher to be installed before installing the extension, if it isn't installed already."
143               },
144               "authuser": {
145                 "type": "string",
146                 "optional": true,
147                 "description": "The authuser index to be included with CRX download requests in multi-login sessions."
148               }
149             },
150             "additionalProperties": { "type": "any" }
151           },
152           {
153             "name": "callback",
154             "type": "function",
155             "description": "Called when the user has either accepted/rejected the dialog, or some error occurred (such as invalid manifest or icon image data).",
156             "optional": true,
157             "parameters": [
158               {
159                 "name": "result",
160                 "$ref": "Result",
161                 "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'."
162               }
163             ]
164           }
165         ]
167       },
168       {
169         "name": "completeInstall",
170         "description": "",
171         "parameters": [
172           {
173             "name": "expected_id",
174             "type": "string",
175             "description": "The id of the extension to be installed. This should match a previous call to beginInstallWithManifest3."
176           },
177           {
178             "name": "callback",
179             "type": "function",
180             "optional": true,
181             "parameters": []
182           }
183         ]
184       },
185       {
186         "name": "showPermissionPromptForDelegatedInstall",
187         "description": "Shows a permission prompt for the given extension, for installing to a different account.",
188         "parameters": [
189           {
190             "name": "details",
191             "type": "object",
192             "properties": {
193               "id": {
194                 "type": "string",
195                 "description": "The id of the extension to be installled.",
196                 "minLength": 32,
197                 "maxLength": 32
198               },
199               "manifest": {
200                 "type": "string",
201                 "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.",
202                 "minLength": 1
203               },
204               "delegatedUser": {
205                 "type": "string",
206                 "description": "The display name of the user for whom the extension should be installed."
207               },
208               "iconUrl": {
209                 "type": "string",
210                 "optional": true,
211                 "desciption": "A URL for the image to display in the confirmation dialog"
212               },
213               "iconData": {
214                 "type": "string",
215                 "optional": true,
216                 "description": "An icon as a base64-encoded image, displayed in a confirmation dialog."
217               },
218               "localizedName": {
219                 "type": "string",
220                 "optional": true,
221                 "description": "A string to use instead of the raw value of the 'name' key from manifest.json."
222               }
223             }
224           },
225           {
226             "name": "callback",
227             "type": "function",
228             "description": "Called when the user has either accepted/rejected the dialog, or some error occurred (such as invalid manifest or icon image data).",
229             "optional": true,
230             "parameters": [
231               {
232                 "name": "result",
233                 "$ref": "Result",
234                 "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', and 'invalid_icon_url'."
235               }
236             ]
237           }
238         ]
239       },
240       {
241         "name": "installBundle",
242         "description": "Initiates the install process for the given bundle of extensions.",
243         "parameters": [
244           {
245             "name": "details",
246             "type": "object",
247             "properties": {
248               "localizedName": {
249                 "type": "string",
250                 "description": "A title to use for display in a confirmation dialog."
251               },
252               "iconUrl": {
253                 "type": "string",
254                 "optional": true,
255                 "desciption": "A URL for the image to display in the confirmation dialog"
256               },
257               "authuser": {
258                 "type": "string",
259                 "optional": true,
260                 "description": "The authuser index to be included with CRX download requests in multi-login sessions."
261               }
262             },
263             "additionalProperties": { "type": "any" }
264           },
265           {
266             "name": "contents",
267             "description": "An array of extension details to be installed.",
268             "type": "array",
269             "items": {
270               "type": "object",
271               "properties": {
272                 "id": {
273                   "type": "string",
274                   "description": "The id of the extension to be installed.",
275                   "minLength": 32,
276                   "maxLength": 32
277                 },
278                 "manifest": {
279                   "type": "string",
280                   "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.",
281                   "minLength": 1
282                 },
283                 "iconUrl": {
284                   "type": "string",
285                   "optional": true,
286                   "desciption": "A URL for the image to display in the confirmation dialog"
287                 },
288                 "localizedName": {
289                   "type": "string",
290                   "description": "A string to use instead of the raw value of the 'name' key from manifest.json."
291                 }
292               }
293             }
294           },
295           {
296             "name": "callback",
297             "type": "function",
298             "description": "Called when the install process completes. Upon failures, chrome.runtime.lastError will be set to 'Invalid id', 'User cancelled install', or 'Unknown error'.",
299             "optional": true,
300             "parameters": []
301           }
302         ]
303       },
304       {
305         "name": "enableAppLauncher",
306         "description": "",
307         "parameters": [
308           {
309             "name": "callback",
310             "type": "function",
311             "optional": true,
312             "parameters": []
313           }
314         ]
315       },
316       {
317         "name": "getBrowserLogin",
318         "description": "Returns the logged-in sync user login if there is one, or the empty string otherwise.",
319         "parameters": [
320           {
321             "name": "callback",
322             "type": "function",
323             "optional": false,
324             "parameters": [
325               {
326                 "name": "info",
327                 "type": "object",
328                 "properties": {
329                   "login": { "type": "string" }
330                 }
331               }
332             ]
333           }
334         ]
335       },
336       {
337         "name": "getStoreLogin",
338         "description": "Returns the previous value set by setStoreLogin, or the empty string if there is none.",
339         "parameters": [
340           {
341             "name": "callback",
342             "type": "function",
343             "optional": false,
344             "parameters": [
345               { "name": "login", "type": "string" }
346             ]
347           }
348         ]
349       },
350       {
351         "name": "setStoreLogin",
352         "description": "Sets a preference value with the store login.",
353         "parameters": [
354           { "name": "login", "type": "string" },
355           {
356             "name": "callback",
357             "type": "function",
358             "optional": true,
359             "parameters": []
360           }
361         ]
362       },
363       {
364         "name": "getWebGLStatus",
365         "description": "Invokes a callback that returns whether WebGL is blacklisted or not.",
366         "parameters": [
367           {
368             "name": "callback",
369             "type": "function",
370             "optional": false,
371             "parameters": [
372               {
373                 "name": "webgl_status",
374                 "$ref": "WebGlStatus"
375               }
376             ]
377           }
378         ]
379       },
380       {
381         "name": "getIsLauncherEnabled",
382         "description": "Returns whether the apps launcher is enabled or not.",
383         "parameters": [
384           {
385             "name": "callback",
386             "type": "function",
387             "optional": false,
388             "parameters": [
389               { "name": "is_enabled", "type": "boolean" }
390             ]
391           }
392         ]
393       },
394       {
395         "name": "isInIncognitoMode",
396         "description": "Returns whether the browser is in incognito mode or not.",
397         "parameters": [
398           {
399             "name": "callback",
400             "type": "function",
401             "optional": false,
402             "parameters": [
403               { "name": "is_incognito", "type": "boolean" }
404             ]
405           }
406         ]
407       },
408       {
409         "name": "getEphemeralAppsEnabled",
410         "description": "Returns whether the ephemeral apps feature is enabled.",
411         "parameters": [
412           {
413             "name": "callback",
414             "type": "function",
415             "optional": false,
416             "parameters": [
417               { "name": "is_enabled", "type": "boolean" }
418             ]
419           }
420         ]
421       },
422       {
423         "name": "launchEphemeralApp",
424         "description": "Installs an app ephemerally in Chrome (if not already fully installed) and launches the app. A user gesture is required.",
425         "parameters": [
426           {
427             "name": "id",
428             "type": "string",
429             "description": "The extension id of the app to launch."
430           },
431           {
432             "name": "callback",
433             "type": "function",
434             "optional": true,
435             "parameters": [
436               {
437                 "name": "result",
438                 "$ref": "Result",
439                 "description": "Whether an attempt to launch an app succeeded, or the reason for failure."
440               }
441             ]
442           }
443         ]
444       }
445     ]
446   }