OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/aura/aura_export.h" | 9 #include "ui/aura/aura_export.h" |
10 | 10 |
11 namespace aura { | 11 namespace aura { |
12 | 12 |
13 class Window; | 13 class Window; |
14 | 14 |
15 class AURA_EXPORT WindowObserver { | 15 class AURA_EXPORT WindowObserver { |
16 public: | 16 public: |
17 // Invoked when the Window |new_window| has been added. | 17 // Invoked when the Window |new_window| has been added. |
18 virtual void OnWindowAdded(Window* new_window) {} | 18 virtual void OnWindowAdded(Window* new_window) {} |
19 | 19 |
20 // Invoked prior to removing |window|. | 20 // Invoked prior to removing |window|. |
21 virtual void OnWillRemoveWindow(Window* window) {} | 21 virtual void OnWillRemoveWindow(Window* window) {} |
22 | 22 |
| 23 // Invoked when the SetVisible() is invoked on a window. |visible| is the |
| 24 // value supplied to SetVisible(). If |visible| is true, window->IsVisible() |
| 25 // may still return false. See description in Window::IsVisible() for details. |
| 26 virtual void OnWindowVisibilityChanged(Window* window, bool visibile) {} |
| 27 |
23 protected: | 28 protected: |
24 virtual ~WindowObserver() {} | 29 virtual ~WindowObserver() {} |
25 }; | 30 }; |
26 | 31 |
27 } // namespace aura | 32 } // namespace aura |
28 | 33 |
29 #endif // UI_AURA_WINDOW_OBSERVER_H_ | 34 #endif // UI_AURA_WINDOW_OBSERVER_H_ |
OLD | NEW |