| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_COMMON_WM_WM_WINDOW_OBSERVER_H_ | |
| 6 #define ASH_COMMON_WM_WM_WINDOW_OBSERVER_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include "ash/ash_export.h" | |
| 11 | |
| 12 namespace gfx { | |
| 13 class Rect; | |
| 14 } | |
| 15 | |
| 16 namespace ash { | |
| 17 namespace wm { | |
| 18 | |
| 19 class WmWindow; | |
| 20 enum class WmWindowProperty; | |
| 21 | |
| 22 class ASH_EXPORT WmWindowObserver { | |
| 23 public: | |
| 24 struct TreeChangeParams { | |
| 25 WmWindow* target = nullptr; | |
| 26 WmWindow* old_parent = nullptr; | |
| 27 WmWindow* new_parent = nullptr; | |
| 28 }; | |
| 29 | |
| 30 // |window| is the window the observer was added to, which is not necessarily | |
| 31 // the window that was added/removed. | |
| 32 virtual void OnWindowTreeChanged(WmWindow* window, | |
| 33 const TreeChangeParams& params) {} | |
| 34 | |
| 35 virtual void OnWindowPropertyChanged(WmWindow* window, | |
| 36 WmWindowProperty property) {} | |
| 37 | |
| 38 virtual void OnWindowStackingChanged(WmWindow* window) {} | |
| 39 | |
| 40 virtual void OnWindowDestroying(WmWindow* window) {} | |
| 41 | |
| 42 virtual void OnWindowBoundsChanged(WmWindow* window, | |
| 43 const gfx::Rect& old_bounds, | |
| 44 const gfx::Rect& new_bounds) {} | |
| 45 | |
| 46 virtual void OnWindowVisibilityChanging(wm::WmWindow* window, bool visible) {} | |
| 47 | |
| 48 virtual void OnWindowTitleChanged(wm::WmWindow* window) {} | |
| 49 | |
| 50 protected: | |
| 51 virtual ~WmWindowObserver() {} | |
| 52 }; | |
| 53 | |
| 54 } // namespace wm | |
| 55 } // namespace ash | |
| 56 | |
| 57 #endif // ASH_COMMON_WM_WM_WINDOW_OBSERVER_H_ | |
| OLD | NEW |