| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "ui/aura/aura_export.h" | 10 #include "ui/aura/aura_export.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 // Called when a Window is about to be removed from a root Window. | 120 // Called when a Window is about to be removed from a root Window. |
| 121 // |new_root| contains the new root Window if it is being added to one | 121 // |new_root| contains the new root Window if it is being added to one |
| 122 // atomically. | 122 // atomically. |
| 123 virtual void OnWindowRemovingFromRootWindow(Window* window, | 123 virtual void OnWindowRemovingFromRootWindow(Window* window, |
| 124 Window* new_root) {} | 124 Window* new_root) {} |
| 125 | 125 |
| 126 // Called when the window title has changed. | 126 // Called when the window title has changed. |
| 127 virtual void OnWindowTitleChanged(Window* window) {} | 127 virtual void OnWindowTitleChanged(Window* window) {} |
| 128 | 128 |
| 129 // Called when the app embedded in |window| disconnects (is no longer |
| 130 // embedded). |
| 131 virtual void OnEmbeddedAppDisconnected(Window* window); |
| 132 |
| 129 protected: | 133 protected: |
| 130 virtual ~WindowObserver(); | 134 virtual ~WindowObserver(); |
| 131 | 135 |
| 132 private: | 136 private: |
| 133 friend class Window; | 137 friend class Window; |
| 134 | 138 |
| 135 // Called when this is added as an observer on |window|. | 139 // Called when this is added as an observer on |window|. |
| 136 void OnObservingWindow(Window* window); | 140 void OnObservingWindow(Window* window); |
| 137 | 141 |
| 138 // Called when this is removed from the observers on |window|. | 142 // Called when this is removed from the observers on |window|. |
| 139 void OnUnobservingWindow(Window* window); | 143 void OnUnobservingWindow(Window* window); |
| 140 | 144 |
| 141 // Tracks the number of windows being observed to track down | 145 // Tracks the number of windows being observed to track down |
| 142 // http://crbug.com/365364. | 146 // http://crbug.com/365364. |
| 143 int observing_; | 147 int observing_; |
| 144 | 148 |
| 145 DISALLOW_COPY_AND_ASSIGN(WindowObserver); | 149 DISALLOW_COPY_AND_ASSIGN(WindowObserver); |
| 146 }; | 150 }; |
| 147 | 151 |
| 148 } // namespace aura | 152 } // namespace aura |
| 149 | 153 |
| 150 #endif // UI_AURA_WINDOW_OBSERVER_H_ | 154 #endif // UI_AURA_WINDOW_OBSERVER_H_ |
| OLD | NEW |