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

Unified Diff: ui/aura/window_observer.h

Issue 101013002: Make sure WindowObservers are removed from window before destruction (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix shutdown order Created 7 years 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/aura/window.cc ('k') | ui/views/corewm/tooltip_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_observer.h
diff --git a/ui/aura/window_observer.h b/ui/aura/window_observer.h
index 5008ac514d50724cc1b924c07609e8ca015459dd..9408ee831dddb83c66c675bca8e197b96ed9b4ef 100644
--- a/ui/aura/window_observer.h
+++ b/ui/aura/window_observer.h
@@ -87,8 +87,14 @@ class AURA_EXPORT WindowObserver {
// destructor). This is called before the window is removed from its parent.
virtual void OnWindowDestroying(Window* window) {}
- // Invoked when the Window has been destroyed (i.e. at the end of its
- // destructor). This is called after the window is removed from its parent.
+ // Invoked when the Window has been destroyed (i.e. at the end of
+ // its destructor). This is called after the window is removed from
+ // its parent. Window automatically removes its WindowObservers
+ // before calling this method, so the following code is no op.
+ //
+ // void MyWindowObserver::OnWindowDestroyed(aura::Window* window) {
+ // window->RemoveObserver(this);
+ // }
virtual void OnWindowDestroyed(Window* window) {}
// Called when a Window has been added to a RootWindow.
« no previous file with comments | « ui/aura/window.cc ('k') | ui/views/corewm/tooltip_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698