Index: chrome/browser/extensions/extension_infobar_delegate.h |
diff --git a/chrome/browser/extensions/extension_infobar_delegate.h b/chrome/browser/extensions/extension_infobar_delegate.h |
index 81f92b80b324671ec0244903b468befe4be55b0e..ec699d9c2a08fb59525984d0657e469890f77ce1 100644 |
--- a/chrome/browser/extensions/extension_infobar_delegate.h |
+++ b/chrome/browser/extensions/extension_infobar_delegate.h |
@@ -6,9 +6,11 @@ |
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_DELEGATE_H_ |
#include "base/memory/scoped_ptr.h" |
+#include "base/scoped_observer.h" |
#include "chrome/browser/infobars/confirm_infobar_delegate.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
+#include "extensions/browser/extension_registry_observer.h" |
class Browser; |
class GURL; |
@@ -19,13 +21,15 @@ class WebContents; |
namespace extensions { |
class Extension; |
+class ExtensionRegistry; |
class ExtensionViewHost; |
} |
// The InfobarDelegate for creating and managing state for the ExtensionInfobar |
// plus monitor when the extension goes away. |
class ExtensionInfoBarDelegate : public infobars::InfoBarDelegate, |
- public content::NotificationObserver { |
+ public content::NotificationObserver, |
+ public extensions::ExtensionRegistryObserver { |
public: |
virtual ~ExtensionInfoBarDelegate(); |
@@ -59,18 +63,24 @@ class ExtensionInfoBarDelegate : public infobars::InfoBarDelegate, |
static scoped_ptr<infobars::InfoBar> CreateInfoBar( |
scoped_ptr<ExtensionInfoBarDelegate> delegate); |
- // InfoBarDelegate: |
+ // InfoBarDelegate. |
virtual bool EqualsDelegate( |
infobars::InfoBarDelegate* delegate) const OVERRIDE; |
virtual void InfoBarDismissed() OVERRIDE; |
virtual Type GetInfoBarType() const OVERRIDE; |
virtual ExtensionInfoBarDelegate* AsExtensionInfoBarDelegate() OVERRIDE; |
- // content::NotificationObserver: |
+ // content::NotificationObserver. |
virtual void Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
+ // extensions::ExtensionRegistryObserver. |
+ virtual void OnExtensionUnloaded( |
+ content::BrowserContext* browser_context, |
+ const extensions::Extension* extension, |
+ extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE; |
+ |
#if defined(TOOLKIT_VIEWS) |
Browser* browser_; // We pass this to the ExtensionInfoBar. |
#endif |
@@ -82,6 +92,10 @@ class ExtensionInfoBarDelegate : public infobars::InfoBarDelegate, |
const extensions::Extension* extension_; |
content::NotificationRegistrar registrar_; |
+ ScopedObserver<extensions::ExtensionRegistry, |
+ extensions::ExtensionRegistryObserver> |
+ extension_registry_observer_; |
+ |
// The requested height of the infobar (in pixels). |
int height_; |