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 "base/strings/string16.h" |
9 #include "ui/aura/aura_export.h" | 10 #include "ui/aura/aura_export.h" |
10 | 11 |
11 namespace gfx { | 12 namespace gfx { |
12 class Rect; | 13 class Rect; |
13 } // namespace gfx | 14 } // namespace gfx |
14 | 15 |
15 namespace aura { | 16 namespace aura { |
16 | 17 |
17 class Window; | 18 class Window; |
18 | 19 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 106 |
106 // Called when a Window has been added to a RootWindow. | 107 // Called when a Window has been added to a RootWindow. |
107 virtual void OnWindowAddedToRootWindow(Window* window) {} | 108 virtual void OnWindowAddedToRootWindow(Window* window) {} |
108 | 109 |
109 // Called when a Window is about to be removed from a root Window. | 110 // Called when a Window is about to be removed from a root Window. |
110 // |new_root| contains the new root Window if it is being added to one | 111 // |new_root| contains the new root Window if it is being added to one |
111 // atomically. | 112 // atomically. |
112 virtual void OnWindowRemovingFromRootWindow(Window* window, | 113 virtual void OnWindowRemovingFromRootWindow(Window* window, |
113 Window* new_root) {} | 114 Window* new_root) {} |
114 | 115 |
| 116 // Called when the window title has changed. |
| 117 virtual void OnWindowTitleChanged(Window* window) {} |
| 118 |
115 protected: | 119 protected: |
116 virtual ~WindowObserver(); | 120 virtual ~WindowObserver(); |
117 | 121 |
118 private: | 122 private: |
119 friend class Window; | 123 friend class Window; |
120 | 124 |
121 // Called when this is added as an observer on |window|. | 125 // Called when this is added as an observer on |window|. |
122 void OnObservingWindow(Window* window); | 126 void OnObservingWindow(Window* window); |
123 | 127 |
124 // Called when this is removed from the observers on |window|. | 128 // Called when this is removed from the observers on |window|. |
125 void OnUnobservingWindow(Window* window); | 129 void OnUnobservingWindow(Window* window); |
126 | 130 |
127 // Tracks the number of windows being observed to track down | 131 // Tracks the number of windows being observed to track down |
128 // http://crbug.com/365364. | 132 // http://crbug.com/365364. |
129 int observing_; | 133 int observing_; |
130 | 134 |
131 DISALLOW_COPY_AND_ASSIGN(WindowObserver); | 135 DISALLOW_COPY_AND_ASSIGN(WindowObserver); |
132 }; | 136 }; |
133 | 137 |
134 } // namespace aura | 138 } // namespace aura |
135 | 139 |
136 #endif // UI_AURA_WINDOW_OBSERVER_H_ | 140 #endif // UI_AURA_WINDOW_OBSERVER_H_ |
OLD | NEW |