| 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_WINDOW_OBSERVER_H_ | |
| 6 #define ASH_COMMON_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 | |
| 18 class WmWindow; | |
| 19 enum class WmWindowProperty; | |
| 20 | |
| 21 class ASH_EXPORT WmWindowObserver { | |
| 22 public: | |
| 23 struct TreeChangeParams { | |
| 24 WmWindow* target = nullptr; | |
| 25 WmWindow* old_parent = nullptr; | |
| 26 WmWindow* new_parent = nullptr; | |
| 27 }; | |
| 28 | |
| 29 // |window| is the window the observer was added to, which is not necessarily | |
| 30 // the window that was added/removed. | |
| 31 virtual void OnWindowTreeChanging(WmWindow* window, | |
| 32 const TreeChangeParams& params) {} | |
| 33 virtual void OnWindowTreeChanged(WmWindow* window, | |
| 34 const TreeChangeParams& params) {} | |
| 35 | |
| 36 virtual void OnWindowPropertyChanged(WmWindow* window, | |
| 37 WmWindowProperty property) {} | |
| 38 | |
| 39 virtual void OnWindowStackingChanged(WmWindow* window) {} | |
| 40 | |
| 41 virtual void OnWindowDestroying(WmWindow* window) {} | |
| 42 virtual void OnWindowDestroyed(WmWindow* window) {} | |
| 43 | |
| 44 virtual void OnWindowBoundsChanged(WmWindow* window, | |
| 45 const gfx::Rect& old_bounds, | |
| 46 const gfx::Rect& new_bounds) {} | |
| 47 | |
| 48 virtual void OnWindowVisibilityChanging(WmWindow* window, bool visible) {} | |
| 49 | |
| 50 // Behavior of this function matches that of | |
| 51 // aura::WindowObserver::OnWindowVisibilityChanged(), see it for details. | |
| 52 virtual void OnWindowVisibilityChanged(WmWindow* window, bool visible) {} | |
| 53 | |
| 54 virtual void OnWindowTitleChanged(WmWindow* window) {} | |
| 55 | |
| 56 protected: | |
| 57 virtual ~WmWindowObserver() {} | |
| 58 }; | |
| 59 | |
| 60 } // namespace ash | |
| 61 | |
| 62 #endif // ASH_COMMON_WM_WINDOW_OBSERVER_H_ | |
| OLD | NEW |