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

Unified Diff: chrome/browser/views/infobars/extension_infobar.cc

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 | « chrome/browser/extensions/extension_infobar_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/infobars/extension_infobar.cc
diff --git a/chrome/browser/views/infobars/extension_infobar.cc b/chrome/browser/views/infobars/extension_infobar.cc
index 6a6be3f2f58ecef0bba2bf8a3ba6f4482e0a43d1..f3e6dd3d3498ea7c3628184da7246e67188bc404 100644
--- a/chrome/browser/views/infobars/extension_infobar.cc
+++ b/chrome/browser/views/infobars/extension_infobar.cc
@@ -67,6 +67,14 @@ ExtensionInfoBar::~ExtensionInfoBar() {
void ExtensionInfoBar::OnExtensionPreferredSizeChanged(ExtensionView* view) {
DCHECK(view == delegate_->extension_host()->view());
+
+ // When the infobar is closed, it animates to 0 vertical height. We'll
+ // continue to get size changed notifications from the ExtensionView, but we
+ // need to ignore them otherwise we'll try to re-animate open (and leak the
+ // infobar view).
+ if (delegate_->closing())
+ return;
+
delegate_->extension_host()->view()->SetVisible(true);
gfx::Size sz = view->GetPreferredSize();
« no previous file with comments | « chrome/browser/extensions/extension_infobar_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698