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

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 | « ui/views/bubble/bubble_delegate.h ('k') | 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..04d77cae751e3a534c51d38b9e759957293ab5e5 100644
--- a/ui/views/bubble/bubble_delegate.cc
+++ b/ui/views/bubble/bubble_delegate.cc
@@ -163,6 +163,13 @@ View* BubbleDelegateView::GetInitiallyFocusedView() {
return this;
}
+void BubbleDelegateView::WindowClosing() {
+ if (anchor_widget_) {
msw 2012/04/24 18:10:41 nit: use anchor_widget() here and @line168 for r-v
sadrul 2012/04/24 18:15:42 I think we actually prefer directly using the vari
msw 2012/04/24 18:24:58 Fair enough.
+ anchor_widget_->RemoveObserver(this);
+ anchor_widget_ = NULL;
msw 2012/04/24 18:10:41 Sorry, would you mind also setting anchor_view_ to
sadrul 2012/04/24 18:15:42 Done.
+ }
+}
+
BubbleDelegateView* BubbleDelegateView::AsBubbleDelegate() {
return this;
}
« no previous file with comments | « ui/views/bubble/bubble_delegate.h ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698