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

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

Issue 2148343002: [Extensions] Rework inline installation observation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 5 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.h
diff --git a/chrome/browser/extensions/tab_helper.h b/chrome/browser/extensions/tab_helper.h
index 17846b5c0c4cf9b84d62d1e0d7ac65468301e179..e8f8ecd4fac48367d9263289fb60afb7065bda89 100644
--- a/chrome/browser/extensions/tab_helper.h
+++ b/chrome/browser/extensions/tab_helper.h
@@ -123,6 +123,8 @@ class TabHelper : public content::WebContentsObserver,
WebstoreInlineInstallerFactory* factory);
private:
+ class InlineInstallObserver;
+
// Utility function to invoke member functions on all relevant
// ContentRulesRegistries.
template <class Func>
@@ -190,6 +192,7 @@ class TabHelper : public content::WebContentsObserver,
// WebstoreStandaloneInstaller::Callback.
void OnInlineInstallComplete(int install_id,
int return_route_id,
+ const std::string& extension_id,
bool success,
const std::string& error,
webstore_install::Result result);
@@ -197,6 +200,7 @@ class TabHelper : public content::WebContentsObserver,
// ExtensionReenabler::Callback.
void OnReenableComplete(int install_id,
int return_route_id,
+ const std::string& extension_id,
ExtensionReenabler::ReenableResult result);
// content::NotificationObserver.
@@ -259,6 +263,14 @@ class TabHelper : public content::WebContentsObserver,
// The reenable prompt for disabled extensions, if any.
std::unique_ptr<ExtensionReenabler> extension_reenabler_;
+ // Map of extension id -> InlineInstallObserver for inline installations that
+ // have progress listeners.
+ std::map<std::string, std::unique_ptr<InlineInstallObserver>>
+ install_observers_;
+
+ // The set of extension ids that are currently being installed.
+ std::set<std::string> pending_inline_installations_;
+
// Vend weak pointers that can be invalidated to stop in-progress loads.
base::WeakPtrFactory<TabHelper> image_loader_ptr_factory_;
« no previous file with comments | « chrome/browser/extensions/browser_context_keyed_service_factories.cc ('k') | chrome/browser/extensions/tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698