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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/webstore.json
diff --git a/chrome/common/extensions/api/webstore.json b/chrome/common/extensions/api/webstore.json
index 31cbd2d01239d79f5abb53706727928da82a6cd2..fe3ed26fa05a65c46b07672ebab75bd94b3b33c7 100644
--- a/chrome/common/extensions/api/webstore.json
+++ b/chrome/common/extensions/api/webstore.json
@@ -6,6 +6,14 @@
{
"namespace": "webstore",
"description": "Use the <code>chrome.webstore</code> API to initiate app and extension installations \"inline\" from your site.",
+ "types": [
+ {
+ "id": "InstallStage",
+ "type": "string",
+ "enum": ["installing", "downloading"],
+ "description": "Enum used to indicate the stage of the installation process. 'downloading' indicates that the necessary files are being downloaded, and 'installing' indicates that the files are downloaded and are being actively installed."
+ }
+ ], // types
"functions": [
{
"name": "install",
@@ -38,7 +46,43 @@
"description": "This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site."
}
]
- } // install
- ]
+ }, // install
+ {
+ "name": "setInstallStageListener",
+ "description": "Set a listener function to be called whenever an inline installation enters a new InstallStage.",
+ "parameters": [
+ {
+ "name": "listener",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "stage",
+ "$ref": "InstallStage",
+ "description": "The InstallStage that just began."
+ }
+ ],
+ "description": "The listener function to be called."
+ }
+ ]
+ }, // setInstallChangeListener
+ {
+ "name": "setDownloadProgressListener",
+ "description": "Set a listener function to be called with periodic download progress updates.",
+ "parameters": [
+ {
+ "name": "listener",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "percentDownloaded",
+ "type": "number",
+ "description": "The percentage of the download which has been completed."
+ }
+ ],
+ "description": "The listener function to be called."
+ }
+ ]
+ } // setDownloadProgressListener
+ ] // functions
} // webstore
]

Powered by Google App Engine
This is Rietveld 408576698