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

Unified Diff: chrome/browser/ui/extensions/extension_enable_flow.h

Issue 251603004: Remove NOTIFICATION_EXTENSION_LOADED_DEPRECATED from c/b/ui/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review Created 6 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/extension_enable_flow.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/extensions/extension_enable_flow.h
diff --git a/chrome/browser/ui/extensions/extension_enable_flow.h b/chrome/browser/ui/extensions/extension_enable_flow.h
index dea94f071487070c5d980ff9976dfeb30c2a6683..09aa01a92a2a935fa18da1537813093c9c3d62b6 100644
--- a/chrome/browser/ui/extensions/extension_enable_flow.h
+++ b/chrome/browser/ui/extensions/extension_enable_flow.h
@@ -10,10 +10,12 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/scoped_observer.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/page_navigator.h"
+#include "extensions/browser/extension_registry_observer.h"
class ExtensionEnableFlowDelegate;
@@ -22,6 +24,10 @@ class PageNavigator;
class WebContents;
}
+namespace extensions {
+class ExtensionRegistry;
+}
+
// ExtensionEnableFlow performs an UI flow to enable a disabled/terminated
// extension. It calls its delegate when enabling is done or is aborted.
// Callback on the delegate might be called synchronously if there is no
@@ -31,7 +37,8 @@ class WebContents;
// flow is aborted when user declines it.
class ExtensionEnableFlow : public ExtensionInstallPrompt::Delegate,
public content::PageNavigator,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public extensions::ExtensionRegistryObserver {
public:
ExtensionEnableFlow(Profile* profile,
const std::string& extension_id,
@@ -77,6 +84,11 @@ class ExtensionEnableFlow : public ExtensionInstallPrompt::Delegate,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // extensions::ExtensionRegistryObserver overrides:
+ virtual void OnExtensionLoaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension) OVERRIDE;
+
// ExtensionInstallPrompt::Delegate overrides:
virtual void InstallUIProceed() OVERRIDE;
virtual void InstallUIAbort(bool user_initiated) OVERRIDE;
@@ -104,6 +116,11 @@ class ExtensionEnableFlow : public ExtensionInstallPrompt::Delegate,
scoped_ptr<ExtensionInstallPrompt> prompt_;
content::NotificationRegistrar registrar_;
+ // Listen to extension load notification.
+ ScopedObserver<extensions::ExtensionRegistry,
+ extensions::ExtensionRegistryObserver>
+ extension_registry_observer_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionEnableFlow);
};
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/extension_enable_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698