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

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

Issue 2103663002: [Extensions] Rework inline installation observation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missingfile Created 4 years, 6 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 c3d368ec5f8c004cb028ad4aed5fa194cc899df4..6a79054d01de92a65356ac53d41a4b3314b6540a 100644
--- a/chrome/browser/extensions/tab_helper.h
+++ b/chrome/browser/extensions/tab_helper.h
@@ -126,6 +126,8 @@ class TabHelper : public content::WebContentsObserver,
WebstoreInlineInstallerFactory* factory);
private:
+ class InlineInstallObserver;
+
// Utility function to invoke member functions on all relevant
// ContentRulesRegistries.
template <class Func>
@@ -198,6 +200,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);
@@ -205,6 +208,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.
@@ -270,6 +274,14 @@ class TabHelper : public content::WebContentsObserver,
ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
registry_observer_;
+ // 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