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

Unified Diff: chrome/browser/extensions/tab_helper.cc

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: Fix test 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/browser/extensions/tab_helper.cc
diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc
index 25e4486b86bb7d29f2f0abb476dd2052020e519e..b357ca48b89f6797522bf4835f5f563048d89911 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,20 @@ 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)
jln (very slow on Chromium) 2014/03/10 23:35:41 Could you check that listeners_mask is something t
Devlin 2014/03/11 17:22:06 Checked. But (unless my bitwise-logic is wrong, w
+ // 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);

Powered by Google App Engine
This is Rietveld 408576698