diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-28 20:34:47 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-28 20:34:47 +0000 |
commit | 4a04295440ba2cd51e844015aab950b2ecece36b (patch) | |
tree | 2d9e691bbd8f1506552d19fbb8d75702cab6b9a3 /chrome/browser/extensions/extension_infobar_delegate.h | |
parent | 2ae8a924423bb36127f397bad1354eb64da9c747 (diff) | |
download | chromium_src-4a04295440ba2cd51e844015aab950b2ecece36b.zip chromium_src-4a04295440ba2cd51e844015aab950b2ecece36b.tar.gz chromium_src-4a04295440ba2cd51e844015aab950b2ecece36b.tar.bz2 |
Fix animation bug in ExtensionInfoBar would can result in orphaned instances in the view hierarchy
BUG=47576
TEST=none
Review URL: http://codereview.chromium.org/2844033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51040 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_infobar_delegate.h')
-rw-r--r-- | chrome/browser/extensions/extension_infobar_delegate.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_infobar_delegate.h b/chrome/browser/extensions/extension_infobar_delegate.h index 25e548f..01174ef 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); }; |