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

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: cc 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.h ('k') | ui/aura/window_observer.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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 its
91 // destructor). This is called after the window is removed from its parent. 91 // destructor). This is called after the window is removed from its parent.
92 virtual void OnWindowDestroyed(Window* window) {} 92 // The default implementation simply remove itself from |window|'s observer
sky 2013/12/04 04:27:32 If we're going to do this, then we should follow t
93 // list.
94 virtual void OnWindowDestroyed(Window* window);
93 95
94 // Called when a Window has been added to a RootWindow. 96 // Called when a Window has been added to a RootWindow.
95 virtual void OnWindowAddedToRootWindow(Window* window) {} 97 virtual void OnWindowAddedToRootWindow(Window* window) {}
96 98
97 // Called when a Window is about to be removed from a RootWindow. 99 // Called when a Window is about to be removed from a RootWindow.
98 virtual void OnWindowRemovingFromRootWindow(Window* window) {} 100 virtual void OnWindowRemovingFromRootWindow(Window* window) {}
99 101
100 // Called when a transient child is added to |window|. 102 // Called when a transient child is added to |window|.
101 virtual void OnAddTransientChild(Window* window, Window* transient) {} 103 virtual void OnAddTransientChild(Window* window, Window* transient) {}
102 104
103 // Called when a transient child is removed from |window|. 105 // Called when a transient child is removed from |window|.
104 virtual void OnRemoveTransientChild(Window* window, Window* transient) {} 106 virtual void OnRemoveTransientChild(Window* window, Window* transient) {}
105 107
106 protected: 108 protected:
107 virtual ~WindowObserver() {} 109 virtual ~WindowObserver() {}
108 }; 110 };
109 111
110 } // namespace aura 112 } // namespace aura
111 113
112 #endif // UI_AURA_WINDOW_OBSERVER_H_ 114 #endif // UI_AURA_WINDOW_OBSERVER_H_
OLDNEW
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698