Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

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: Latest master Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
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
17 "events": [
18 {
19 "name": "onInstallStageChanged",
20 "description": "Fired when an inline installation enters a new InstallSt age. In order to receive notifications about this event, listeners must be regis tered before the inline installation begins.",
21 "type": "function",
22 "parameters": [
23 {
24 "name": "stage",
25 "$ref": "InstallStage",
26 "description": "The InstallStage that just began."
27 }
28 ]
29 }, // onInstallStageChanged
30 {
31 "name": "onDownloadProgress",
32 "description": "Fired periodically with the download progress of an inli ne install. In order to receive notifications about this event, listeners must b e registered before the inline installation begins.",
33 "type": "function",
34 "parameters": [
35 {
36 "name": "percentDownloaded",
37 "type": "number",
38 "description": "The progress of the download, between 0 and 1. 0 ind icates no progress; 1.0 indicates complete."
39 }
40 ]
41 } // onDownloadProgress
42 ], // events
9 "functions": [ 43 "functions": [
10 { 44 {
11 "name": "install", 45 "name": "install",
12 "allowAmbiguousOptionalArguments": true, 46 "allowAmbiguousOptionalArguments": true,
13 "parameters": [ 47 "parameters": [
14 { 48 {
15 "name": "url", 49 "name": "url",
16 "type": "string", 50 "type": "string",
17 "optional": true, 51 "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." 52 "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 13 matching lines...) Expand all
32 { 66 {
33 "name": "error", 67 "name": "error",
34 "type": "string", 68 "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." 69 "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 } 70 }
37 ], 71 ],
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." 72 "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 } 73 }
40 ] 74 ]
41 } // install 75 } // install
42 ] 76 ] // functions
43 } // webstore 77 } // webstore
44 ] 78 ]
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/common/extensions/api/webstore/webstore_api_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698