| 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 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 virtual void OnWindowAdded(Window* new_window) {} | 22 virtual void OnWindowAdded(Window* new_window) {} |
| 23 | 23 |
| 24 // Invoked prior to removing |window| as a child of this window. | 24 // Invoked prior to removing |window| as a child of this window. |
| 25 virtual void OnWillRemoveWindow(Window* window) {} | 25 virtual void OnWillRemoveWindow(Window* window) {} |
| 26 | 26 |
| 27 // Invoked when this window's parent window changes. |parent| may be NULL. | 27 // Invoked when this window's parent window changes. |parent| may be NULL. |
| 28 virtual void OnWindowParentChanged(Window* window, Window* parent) {} | 28 virtual void OnWindowParentChanged(Window* window, Window* parent) {} |
| 29 | 29 |
| 30 // Invoked when SetProperty() or SetIntProperty() is called on |window|. | 30 // Invoked when SetProperty() or SetIntProperty() is called on |window|. |
| 31 // |old| is the old property value. | 31 // |old| is the old property value. |
| 32 virtual void OnPropertyChanged(Window* window, const char* key, void* old) {} | 32 virtual void OnWindowPropertyChanged(Window* window, |
| 33 const char* key, |
| 34 void* old) {} |
| 33 | 35 |
| 34 // Invoked when SetVisible() is invoked on a window. |visible| is the | 36 // Invoked when SetVisible() is invoked on a window. |visible| is the |
| 35 // value supplied to SetVisible(). If |visible| is true, window->IsVisible() | 37 // value supplied to SetVisible(). If |visible| is true, window->IsVisible() |
| 36 // may still return false. See description in Window::IsVisible() for details. | 38 // may still return false. See description in Window::IsVisible() for details. |
| 37 virtual void OnWindowVisibilityChanged(Window* window, bool visible) {} | 39 virtual void OnWindowVisibilityChanged(Window* window, bool visible) {} |
| 38 | 40 |
| 39 // Invoked when SetBounds() is invoked on |window|. |bounds| contains the | 41 // Invoked when SetBounds() is invoked on |window|. |bounds| contains the |
| 40 // window's new bounds. | 42 // window's new bounds. |
| 41 virtual void OnWindowBoundsChanged(Window* window, const gfx::Rect& bounds) {} | 43 virtual void OnWindowBoundsChanged(Window* window, const gfx::Rect& bounds) {} |
| 42 | 44 |
| 43 // Invoked when |window|'s position among its siblings in the stacking order | 45 // Invoked when |window|'s position among its siblings in the stacking order |
| 44 // has changed. | 46 // has changed. |
| 45 virtual void OnWindowStackingChanged(Window* window) {} | 47 virtual void OnWindowStackingChanged(Window* window) {} |
| 46 | 48 |
| 47 // Invoked when the Window has been destroyed (i.e. from its destructor). | 49 // Invoked when the Window has been destroyed (i.e. from its destructor). |
| 48 virtual void OnWindowDestroyed(Window* window) {} | 50 virtual void OnWindowDestroyed(Window* window) {} |
| 49 | 51 |
| 50 protected: | 52 protected: |
| 51 virtual ~WindowObserver() {} | 53 virtual ~WindowObserver() {} |
| 52 }; | 54 }; |
| 53 | 55 |
| 54 } // namespace aura | 56 } // namespace aura |
| 55 | 57 |
| 56 #endif // UI_AURA_WINDOW_OBSERVER_H_ | 58 #endif // UI_AURA_WINDOW_OBSERVER_H_ |
| OLD | NEW |