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

Unified Diff: ui/views/bubble/bubble_delegate.cc

Issue 10204014: views: Make sure the bubble-delegate removes itself from the anchor-widget's observer list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_delegate.cc
diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc
index f593a1b23e21fe762c086a2ce229c8f447b0181f..5d7abc0a3afc527ab0edc76ac7cf6eb8cd08db08 100644
--- a/ui/views/bubble/bubble_delegate.cc
+++ b/ui/views/bubble/bubble_delegate.cc
@@ -138,7 +138,10 @@ BubbleDelegateView::BubbleDelegateView(
AddAccelerator(ui::Accelerator(ui::VKEY_ESCAPE, 0));
}
-BubbleDelegateView::~BubbleDelegateView() {}
+BubbleDelegateView::~BubbleDelegateView() {
+ if (anchor_widget_)
+ anchor_widget_->RemoveObserver(this);
msw 2012/04/24 14:49:06 Try OnWidgetClosing, but even then, I find this is
sadrul 2012/04/24 15:15:53 I am not sure I understand what you mean.
msw 2012/04/24 17:01:43 Sorry, I meant to say try putting this in a Widget
sadrul 2012/04/24 18:00:49 Done.
+}
// static
Widget* BubbleDelegateView::CreateBubble(BubbleDelegateView* bubble_delegate) {
« no previous file with comments | « no previous file | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698