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 25e548fa0f298eea91ca668a543f1a39e45aa582..01174efc26d7dc0ce9fab8614f3daec8144f102c 100644 |
--- a/chrome/browser/extensions/extension_infobar_delegate.h |
+++ b/chrome/browser/extensions/extension_infobar_delegate.h |
@@ -33,6 +33,7 @@ class ExtensionInfoBarDelegate : public InfoBarDelegate, |
void set_observer(DelegateObserver* observer) { observer_ = observer; } |
// Overridden from InfoBarDelegate: |
+ virtual void InfoBarDismissed() { closing_ = true; } |
virtual bool EqualsDelegate(InfoBarDelegate* delegate) const; |
virtual void InfoBarClosed(); |
virtual InfoBar* CreateInfoBar(); |
@@ -48,6 +49,7 @@ class ExtensionInfoBarDelegate : public InfoBarDelegate, |
const NotificationSource& source, |
const NotificationDetails& details); |
+ bool closing() { return closing_; } |
private: |
// The extension host we are showing the InfoBar for. The delegate needs to |
// own this since the InfoBar gets deleted and recreated when you switch tabs |
@@ -64,6 +66,10 @@ class ExtensionInfoBarDelegate : public InfoBarDelegate, |
NotificationRegistrar registrar_; |
+ // Whether we are currently animating to close. This is used to ignore |
+ // ExtensionView::PreferredSizeChanged notifications. |
+ bool closing_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarDelegate); |
}; |