Chromium Code Reviews

Side by Side Diff: chrome/common/extensions/api/webstore.json

Issue 175263003: Add chrome.webstore API methods to allow sites to see progress of installation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "webstore", 7 "namespace": "webstore",
8 "description": "Use the <code>chrome.webstore</code> API to initiate app and extension installations \"inline\" from your site.", 8 "description": "Use the <code>chrome.webstore</code> API to initiate app and extension installations \"inline\" from your site.",
9 "types": [
10 {
11 "id": "InstallStage",
12 "type": "string",
13 "enum": ["installing", "downloading"],
14 "description": "Enum used to indicate the stage of the installation proc ess. 'downloading' indicates that the necessary files are being downloaded, and 'installing' indicates that the files are downloaded and are being actively inst alled."
15 }
16 ], // types
9 "functions": [ 17 "functions": [
10 { 18 {
11 "name": "install", 19 "name": "install",
12 "allowAmbiguousOptionalArguments": true, 20 "allowAmbiguousOptionalArguments": true,
13 "parameters": [ 21 "parameters": [
14 { 22 {
15 "name": "url", 23 "name": "url",
16 "type": "string", 24 "type": "string",
17 "optional": true, 25 "optional": true,
18 "description": "If you have more than one <code>&lt;link&gt;</code> tag on your page with the <code>chrome-webstore-item</code> relation, you can ch oose which item you'd like to install by passing in its URL here. If it is omitt ed, then the first (or only) link will be used. An exception will be thrown if t he passed in URL does not exist on the page." 26 "description": "If you have more than one <code>&lt;link&gt;</code> tag on your page with the <code>chrome-webstore-item</code> relation, you can ch oose which item you'd like to install by passing in its URL here. If it is omitt ed, then the first (or only) link will be used. An exception will be thrown if t he passed in URL does not exist on the page."
(...skipping 12 matching lines...)
31 "parameters": [ 39 "parameters": [
32 { 40 {
33 "name": "error", 41 "name": "error",
34 "type": "string", 42 "type": "string",
35 "description": "The failure detail. You may wish to inspect or l og this for debugging purposes, but you should not rely on specific strings bein g passed back." 43 "description": "The failure detail. You may wish to inspect or l og this for debugging purposes, but you should not rely on specific strings bein g passed back."
36 } 44 }
37 ], 45 ],
38 "description": "This function is invoked when inline installation do es not successfully complete. Possible reasons for this include the user canceli ng the dialog, the linked item not being found in the store, or the install bein g initiated from a non-verified site." 46 "description": "This function is invoked when inline installation do es not successfully complete. Possible reasons for this include the user canceli ng the dialog, the linked item not being found in the store, or the install bein g initiated from a non-verified site."
39 } 47 }
40 ] 48 ]
41 } // install 49 }, // install
42 ] 50 {
51 "name": "setInstallStageListener",
52 "description": "Set a listener function to be called whenever an inline installation enters a new InstallStage.",
53 "parameters": [
54 {
55 "name": "listener",
56 "type": "function",
57 "parameters": [
58 {
59 "name": "stage",
60 "$ref": "InstallStage",
61 "description": "The InstallStage that just began."
62 }
63 ],
64 "description": "The listener function to be called."
65 }
66 ]
67 }, // setInstallChangeListener
68 {
69 "name": "setDownloadProgressListener",
70 "description": "Set a listener function to be called with periodic downl oad progress updates.",
71 "parameters": [
72 {
73 "name": "listener",
74 "type": "function",
75 "parameters": [
76 {
77 "name": "percentDownloaded",
78 "type": "number",
79 "description": "The percentage of the download which has been co mpleted."
80 }
81 ],
82 "description": "The listener function to be called."
83 }
84 ]
85 } // setDownloadProgressListener
86 ] // functions
43 } // webstore 87 } // webstore
44 ] 88 ]
OLDNEW

Powered by Google App Engine