summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authormihaip@chromium.org <mihaip@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 22:14:37 +0000
committermihaip@chromium.org <mihaip@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 22:14:37 +0000
commit8915f3407209106b732b65dae883b75b35e6b086 (patch)
tree2c860479ee69dcbfa99158d43ca0ca40ee3ba420 /chrome/common
parent82c7bfb8ca07b27406154548434eca6dc111b097 (diff)
downloadchromium_src-8915f3407209106b732b65dae883b75b35e6b086.zip
chromium_src-8915f3407209106b732b65dae883b75b35e6b086.tar.gz
chromium_src-8915f3407209106b732b65dae883b75b35e6b086.tar.bz2
Add WebstoreInlineInstaller (downloads store data, shows the install UI, and starts the install).
The flow is: 1. Fetch store metadata as JSON (using URLFetcher) 2. Parse response in utility process (via SafeWebstoreResponseParser) 3. Parse manifest and get icon data using WebstoreInstallHelper 4. Show install UI 5. Whitelist extension ID for download and start download Still missing are a way of informing the page that the inline install succeeded or failed. Also removes ExtensionTabHelper::GetCustomFrameNativeWindow, since it wasn't actually overriding anything (the method was removed from ExtensionFunctionDispatcher::Delegate by r74835). R=asargent@chromium.org Review URL: http://codereview.chromium.org/7741037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98712 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/extensions/extension_constants.cc4
-rw-r--r--chrome/common/extensions/extension_constants.h4
-rw-r--r--chrome/common/extensions/extension_messages.h5
3 files changed, 13 insertions, 0 deletions
diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc
index 19b9632..96289ea 100644
--- a/chrome/common/extensions/extension_constants.cc
+++ b/chrome/common/extensions/extension_constants.cc
@@ -425,6 +425,10 @@ std::string GetWebstoreItemDetailURLPrefix() {
return GetWebstoreLaunchURL() + "/detail/";
}
+GURL GetWebstoreItemJsonDataURL(const std::string& extension_id) {
+ return GURL(GetWebstoreItemDetailURLPrefix() + extension_id + "?output=json");
+}
+
const char* kGalleryUpdateHttpUrl =
"http://clients2.google.com/service/update2/crx";
const char* kGalleryUpdateHttpsUrl =
diff --git a/chrome/common/extensions/extension_constants.h b/chrome/common/extensions/extension_constants.h
index 925b38f..ba14dd5 100644
--- a/chrome/common/extensions/extension_constants.h
+++ b/chrome/common/extensions/extension_constants.h
@@ -281,6 +281,10 @@ namespace extension_urls {
// to get the item detail URL.
std::string GetWebstoreItemDetailURLPrefix();
+ // Returns the URL used to get webstore data (ratings, manifest, icon URL,
+ // etc.) about an extension from the webstore as JSON.
+ GURL GetWebstoreItemJsonDataURL(const std::string& extension_id);
+
// Return the update URL used by gallery/webstore extensions/apps. The
// |secure| parameter will be ignored if the update URL is overriden with
// --apps-gallery-update-url.
diff --git a/chrome/common/extensions/extension_messages.h b/chrome/common/extensions/extension_messages.h
index df009b4..f09841a 100644
--- a/chrome/common/extensions/extension_messages.h
+++ b/chrome/common/extensions/extension_messages.h
@@ -317,3 +317,8 @@ IPC_MESSAGE_ROUTED1(ExtensionHostMsg_InstallApplication,
// Sent by the renderer to implement chrome.webstore.install().
IPC_MESSAGE_ROUTED1(ExtensionHostMsg_InlineWebstoreInstall,
std::string /* Web Store item ID */)
+
+// Send to renderer once the installation mentioned above is complete.
+IPC_MESSAGE_ROUTED2(ExtensionMsg_InlineWebstoreInstallResponse,
+ bool /* whether the install was successful */,
+ std::string /* error */)