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 const base::string16& new_title) {} | |
flackr
2014/06/24 17:10:51
nit: since we're not passing the old title I would
Nina
2014/06/24 18:36:28
Done.
| |
119 | |
115 protected: | 120 protected: |
116 virtual ~WindowObserver(); | 121 virtual ~WindowObserver(); |
117 | 122 |
118 private: | 123 private: |
119 friend class Window; | 124 friend class Window; |
120 | 125 |
121 // Called when this is added as an observer on |window|. | 126 // Called when this is added as an observer on |window|. |
122 void OnObservingWindow(Window* window); | 127 void OnObservingWindow(Window* window); |
123 | 128 |
124 // Called when this is removed from the observers on |window|. | 129 // Called when this is removed from the observers on |window|. |
125 void OnUnobservingWindow(Window* window); | 130 void OnUnobservingWindow(Window* window); |
126 | 131 |
127 // Tracks the number of windows being observed to track down | 132 // Tracks the number of windows being observed to track down |
128 // http://crbug.com/365364. | 133 // http://crbug.com/365364. |
129 int observing_; | 134 int observing_; |
130 | 135 |
131 DISALLOW_COPY_AND_ASSIGN(WindowObserver); | 136 DISALLOW_COPY_AND_ASSIGN(WindowObserver); |
132 }; | 137 }; |
133 | 138 |
134 } // namespace aura | 139 } // namespace aura |
135 | 140 |
136 #endif // UI_AURA_WINDOW_OBSERVER_H_ | 141 #endif // UI_AURA_WINDOW_OBSERVER_H_ |
OLD | NEW |