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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/window.cc ('k') | ui/views/corewm/tooltip_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_AURA_WINDOW_OBSERVER_H_ 5 #ifndef UI_AURA_WINDOW_OBSERVER_H_
6 #define UI_AURA_WINDOW_OBSERVER_H_ 6 #define UI_AURA_WINDOW_OBSERVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ui/aura/aura_export.h" 9 #include "ui/aura/aura_export.h"
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 virtual void OnWindowStackingChanged(Window* window) {} 80 virtual void OnWindowStackingChanged(Window* window) {}
81 81
82 // Invoked when a region of |window| is scheduled to be redrawn. 82 // Invoked when a region of |window| is scheduled to be redrawn.
83 virtual void OnWindowPaintScheduled(Window* window, 83 virtual void OnWindowPaintScheduled(Window* window,
84 const gfx::Rect& region) {} 84 const gfx::Rect& region) {}
85 85
86 // Invoked when the Window is being destroyed (i.e. from the start of its 86 // Invoked when the Window is being destroyed (i.e. from the start of its
87 // destructor). This is called before the window is removed from its parent. 87 // destructor). This is called before the window is removed from its parent.
88 virtual void OnWindowDestroying(Window* window) {} 88 virtual void OnWindowDestroying(Window* window) {}
89 89
90 // Invoked when the Window has been destroyed (i.e. at the end of its 90 // Invoked when the Window has been destroyed (i.e. at the end of
91 // destructor). This is called after the window is removed from its parent. 91 // its destructor). This is called after the window is removed from
92 // its parent. Window automatically removes its WindowObservers
93 // before calling this method, so the following code is no op.
94 //
95 // void MyWindowObserver::OnWindowDestroyed(aura::Window* window) {
96 // window->RemoveObserver(this);
97 // }
92 virtual void OnWindowDestroyed(Window* window) {} 98 virtual void OnWindowDestroyed(Window* window) {}
93 99
94 // Called when a Window has been added to a RootWindow. 100 // Called when a Window has been added to a RootWindow.
95 virtual void OnWindowAddedToRootWindow(Window* window) {} 101 virtual void OnWindowAddedToRootWindow(Window* window) {}
96 102
97 // Called when a Window is about to be removed from a RootWindow. 103 // Called when a Window is about to be removed from a RootWindow.
98 virtual void OnWindowRemovingFromRootWindow(Window* window) {} 104 virtual void OnWindowRemovingFromRootWindow(Window* window) {}
99 105
100 // Called when a transient child is added to |window|. 106 // Called when a transient child is added to |window|.
101 virtual void OnAddTransientChild(Window* window, Window* transient) {} 107 virtual void OnAddTransientChild(Window* window, Window* transient) {}
102 108
103 // Called when a transient child is removed from |window|. 109 // Called when a transient child is removed from |window|.
104 virtual void OnRemoveTransientChild(Window* window, Window* transient) {} 110 virtual void OnRemoveTransientChild(Window* window, Window* transient) {}
105 111
106 protected: 112 protected:
107 virtual ~WindowObserver() {} 113 virtual ~WindowObserver() {}
108 }; 114 };
109 115
110 } // namespace aura 116 } // namespace aura
111 117
112 #endif // UI_AURA_WINDOW_OBSERVER_H_ 118 #endif // UI_AURA_WINDOW_OBSERVER_H_
OLDNEW
« 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