Chromium Code Reviews| Index: chrome/browser/extensions/tab_helper.cc |
| diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc |
| index 25e4486b86bb7d29f2f0abb476dd2052020e519e..08b37ade3dd9a870784df7cef54f0288e1cab2aa 100644 |
| --- a/chrome/browser/extensions/tab_helper.cc |
| +++ b/chrome/browser/extensions/tab_helper.cc |
| @@ -12,6 +12,7 @@ |
| #include "chrome/browser/extensions/activity_log/activity_log.h" |
| #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" |
| #include "chrome/browser/extensions/api/declarative_content/content_rules_registry.h" |
| +#include "chrome/browser/extensions/api/webstore/webstore_api.h" |
| #include "chrome/browser/extensions/crx_installer.h" |
| #include "chrome/browser/extensions/error_console/error_console.h" |
| #include "chrome/browser/extensions/extension_action.h" |
| @@ -563,11 +564,24 @@ void TabHelper::OnDidGetApplicationInfo(int32 page_id, |
| #endif |
| } |
| -void TabHelper::OnInlineWebstoreInstall( |
| - int install_id, |
| - int return_route_id, |
| - const std::string& webstore_item_id, |
| - const GURL& requestor_url) { |
| +void TabHelper::OnInlineWebstoreInstall(int install_id, |
| + int return_route_id, |
| + const std::string& webstore_item_id, |
| + const GURL& requestor_url, |
| + int listeners_mask) { |
| +#if defined(ENABLE_EXTENSIONS) |
| + // Check that the listener is reasonable. We should never get anything other |
| + // than an install stage listener, a download listener, or both. |
| + DCHECK_EQ(0, listeners_mask & ~(api::webstore::INSTALL_STAGE_LISTENER | |
| + api::webstore::DOWNLOAD_PROGRESS_LISTENER)); |
|
jln (very slow on Chromium)
2014/03/20 00:05:40
This is required for security reasons. So we canno
Devlin
2014/03/20 16:54:37
Amended.
|
| + // Inform the Webstore API that an inline install is happening, in case the |
| + // page requested status updates. |
| + Profile* profile = |
| + Profile::FromBrowserContext(web_contents()->GetBrowserContext()); |
| + WebstoreAPI::Get(profile)->OnInlineInstallStart( |
| + return_route_id, this, webstore_item_id, listeners_mask); |
| +#endif |
| + |
| WebstoreStandaloneInstaller::Callback callback = |
| base::Bind(&TabHelper::OnInlineInstallComplete, base::Unretained(this), |
| install_id, return_route_id); |