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

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

Issue 2844033: Fix animation bug in ExtensionInfoBar would can result in orphaned instances in the view hierarchy (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698