Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 class automatically removes its | |
|
sky
2013/12/05 01:36:35
remove 'class'
oshima
2013/12/05 18:04:01
Done.
| |
| 93 // WindowObservers before calling this method, so the following code | |
| 94 // is no op. | |
| 95 // | |
| 96 // void MyWindowObserver::OnWindowDestroyed(aura::Window* window) { | |
| 97 // window->RemoveObserver(this); | |
| 98 // } | |
| 92 virtual void OnWindowDestroyed(Window* window) {} | 99 virtual void OnWindowDestroyed(Window* window) {} |
| 93 | 100 |
| 94 // Called when a Window has been added to a RootWindow. | 101 // Called when a Window has been added to a RootWindow. |
| 95 virtual void OnWindowAddedToRootWindow(Window* window) {} | 102 virtual void OnWindowAddedToRootWindow(Window* window) {} |
| 96 | 103 |
| 97 // Called when a Window is about to be removed from a RootWindow. | 104 // Called when a Window is about to be removed from a RootWindow. |
| 98 virtual void OnWindowRemovingFromRootWindow(Window* window) {} | 105 virtual void OnWindowRemovingFromRootWindow(Window* window) {} |
| 99 | 106 |
| 100 // Called when a transient child is added to |window|. | 107 // Called when a transient child is added to |window|. |
| 101 virtual void OnAddTransientChild(Window* window, Window* transient) {} | 108 virtual void OnAddTransientChild(Window* window, Window* transient) {} |
| 102 | 109 |
| 103 // Called when a transient child is removed from |window|. | 110 // Called when a transient child is removed from |window|. |
| 104 virtual void OnRemoveTransientChild(Window* window, Window* transient) {} | 111 virtual void OnRemoveTransientChild(Window* window, Window* transient) {} |
| 105 | 112 |
| 106 protected: | 113 protected: |
| 107 virtual ~WindowObserver() {} | 114 virtual ~WindowObserver() {} |
| 108 }; | 115 }; |
| 109 | 116 |
| 110 } // namespace aura | 117 } // namespace aura |
| 111 | 118 |
| 112 #endif // UI_AURA_WINDOW_OBSERVER_H_ | 119 #endif // UI_AURA_WINDOW_OBSERVER_H_ |
| OLD | NEW |