| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 ASH_WM_AURA_WM_WINDOW_AURA_H_ | 5 #ifndef ASH_WM_AURA_WM_WINDOW_AURA_H_ |
| 6 #define ASH_WM_AURA_WM_WINDOW_AURA_H_ | 6 #define ASH_WM_AURA_WM_WINDOW_AURA_H_ |
| 7 | 7 |
| 8 #include "ash/wm/common/wm_window.h" | 8 #include "ash/wm/common/wm_window.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 ui::Layer* GetLayer() override; | 43 ui::Layer* GetLayer() override; |
| 44 gfx::Display GetDisplayNearestWindow() override; | 44 gfx::Display GetDisplayNearestWindow() override; |
| 45 bool HasNonClientArea() override; | 45 bool HasNonClientArea() override; |
| 46 int GetNonClientComponent(const gfx::Point& location) override; | 46 int GetNonClientComponent(const gfx::Point& location) override; |
| 47 gfx::Point ConvertPointToTarget(const WmWindow* target, | 47 gfx::Point ConvertPointToTarget(const WmWindow* target, |
| 48 const gfx::Point& point) const override; | 48 const gfx::Point& point) const override; |
| 49 gfx::Point ConvertPointToScreen(const gfx::Point& point) const override; | 49 gfx::Point ConvertPointToScreen(const gfx::Point& point) const override; |
| 50 gfx::Point ConvertPointFromScreen(const gfx::Point& point) const override; | 50 gfx::Point ConvertPointFromScreen(const gfx::Point& point) const override; |
| 51 gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const override; | 51 gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const override; |
| 52 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const override; | 52 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const override; |
| 53 gfx::Size GetMinimumSize() override; | 53 gfx::Size GetMinimumSize() const override; |
| 54 gfx::Size GetMaximumSize() override; | 54 gfx::Size GetMaximumSize() const override; |
| 55 bool GetTargetVisibility() const override; | 55 bool GetTargetVisibility() const override; |
| 56 bool IsVisible() const override; | 56 bool IsVisible() const override; |
| 57 bool GetBoolProperty(WmWindowProperty key) override; | 57 bool GetBoolProperty(WmWindowProperty key) override; |
| 58 const WindowState* GetWindowState() const override; | 58 const WindowState* GetWindowState() const override; |
| 59 WmWindow* GetToplevelWindow() override; | 59 WmWindow* GetToplevelWindow() override; |
| 60 void SetParentUsingContext(WmWindow* context, | 60 void SetParentUsingContext(WmWindow* context, |
| 61 const gfx::Rect& screen_bounds) override; | 61 const gfx::Rect& screen_bounds) override; |
| 62 void AddChild(WmWindow* window) override; | 62 void AddChild(WmWindow* window) override; |
| 63 WmWindow* GetParent() override; | 63 WmWindow* GetParent() override; |
| 64 WmWindow* GetTransientParent() override; | 64 const WmWindow* GetTransientParent() const override; |
| 65 std::vector<WmWindow*> GetTransientChildren() override; | 65 std::vector<WmWindow*> GetTransientChildren() override; |
| 66 void SetLayoutManager( |
| 67 std::unique_ptr<WmLayoutManager> layout_manager) override; |
| 68 WmLayoutManager* GetLayoutManager() override; |
| 66 void SetVisibilityAnimationType(int type) override; | 69 void SetVisibilityAnimationType(int type) override; |
| 70 void SetVisibilityAnimationDuration(base::TimeDelta delta) override; |
| 67 void Animate(::wm::WindowAnimationType type) override; | 71 void Animate(::wm::WindowAnimationType type) override; |
| 68 void SetBounds(const gfx::Rect& bounds) override; | 72 void SetBounds(const gfx::Rect& bounds) override; |
| 69 void SetBoundsWithTransitionDelay(const gfx::Rect& bounds, | 73 void SetBoundsWithTransitionDelay(const gfx::Rect& bounds, |
| 70 base::TimeDelta delta) override; | 74 base::TimeDelta delta) override; |
| 71 void SetBoundsDirect(const gfx::Rect& bounds) override; | 75 void SetBoundsDirect(const gfx::Rect& bounds) override; |
| 72 void SetBoundsDirectAnimated(const gfx::Rect& bounds) override; | 76 void SetBoundsDirectAnimated(const gfx::Rect& bounds) override; |
| 73 void SetBoundsDirectCrossFade(const gfx::Rect& bounds) override; | 77 void SetBoundsDirectCrossFade(const gfx::Rect& bounds) override; |
| 74 void SetBoundsInScreen(const gfx::Rect& bounds_in_screen, | 78 void SetBoundsInScreen(const gfx::Rect& bounds_in_screen, |
| 75 const gfx::Display& dst_display) override; | 79 const gfx::Display& dst_display) override; |
| 76 gfx::Rect GetBoundsInScreen() const override; | 80 gfx::Rect GetBoundsInScreen() const override; |
| 77 const gfx::Rect& GetBounds() const override; | 81 const gfx::Rect& GetBounds() const override; |
| 78 gfx::Rect GetTargetBounds() override; | 82 gfx::Rect GetTargetBounds() override; |
| 79 void ClearRestoreBounds() override; | 83 void ClearRestoreBounds() override; |
| 80 void SetRestoreBoundsInScreen(const gfx::Rect& bounds) override; | 84 void SetRestoreBoundsInScreen(const gfx::Rect& bounds) override; |
| 81 gfx::Rect GetRestoreBoundsInScreen() const override; | 85 gfx::Rect GetRestoreBoundsInScreen() const override; |
| 82 void OnWMEvent(const wm::WMEvent* event) override; | 86 void OnWMEvent(const wm::WMEvent* event) override; |
| 83 bool Contains(const WmWindow* other) const override; | 87 bool Contains(const WmWindow* other) const override; |
| 84 void SetShowState(ui::WindowShowState show_state) override; | 88 void SetShowState(ui::WindowShowState show_state) override; |
| 85 ui::WindowShowState GetShowState() const override; | 89 ui::WindowShowState GetShowState() const override; |
| 86 void SetRestoreShowState(ui::WindowShowState show_state) override; | 90 void SetRestoreShowState(ui::WindowShowState show_state) override; |
| 87 void SetCapture() override; | 91 void SetCapture() override; |
| 88 bool HasCapture() override; | 92 bool HasCapture() override; |
| 89 void ReleaseCapture() override; | 93 void ReleaseCapture() override; |
| 90 bool HasRestoreBounds() const override; | 94 bool HasRestoreBounds() const override; |
| 91 bool CanMaximize() const override; | 95 bool CanMaximize() const override; |
| 92 bool CanMinimize() const override; | 96 bool CanMinimize() const override; |
| 93 bool CanResize() const override; | 97 bool CanResize() const override; |
| 94 bool CanActivate() const override; | 98 bool CanActivate() const override; |
| 95 void StackChildAtTop(WmWindow* child) override; | 99 void StackChildAtTop(WmWindow* child) override; |
| 100 void StackChildAtBottom(WmWindow* child) override; |
| 96 void StackChildAbove(WmWindow* child, WmWindow* target) override; | 101 void StackChildAbove(WmWindow* child, WmWindow* target) override; |
| 97 void StackChildBelow(WmWindow* child, WmWindow* target) override; | 102 void StackChildBelow(WmWindow* child, WmWindow* target) override; |
| 98 void SetAlwaysOnTop(bool value) override; | 103 void SetAlwaysOnTop(bool value) override; |
| 99 bool IsAlwaysOnTop() const override; | 104 bool IsAlwaysOnTop() const override; |
| 100 void Hide() override; | 105 void Hide() override; |
| 101 void Show() override; | 106 void Show() override; |
| 107 bool IsFocused() const override; |
| 102 bool IsActive() const override; | 108 bool IsActive() const override; |
| 103 void Activate() override; | 109 void Activate() override; |
| 104 void Deactivate() override; | 110 void Deactivate() override; |
| 105 void Maximize() override; | 111 void Maximize() override; |
| 106 void Minimize() override; | 112 void Minimize() override; |
| 107 void Unminimize() override; | 113 void Unminimize() override; |
| 108 std::vector<WmWindow*> GetChildren() override; | 114 std::vector<WmWindow*> GetChildren() override; |
| 115 void SnapToPixelBoundaryIfNecessary() override; |
| 109 void AddObserver(WmWindowObserver* observer) override; | 116 void AddObserver(WmWindowObserver* observer) override; |
| 110 void RemoveObserver(WmWindowObserver* observer) override; | 117 void RemoveObserver(WmWindowObserver* observer) override; |
| 111 | 118 |
| 112 private: | 119 private: |
| 113 // aura::WindowObserver: | 120 // aura::WindowObserver: |
| 114 void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override; | 121 void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override; |
| 115 void OnWindowStackingChanged(aura::Window* window) override; | 122 void OnWindowStackingChanged(aura::Window* window) override; |
| 116 void OnWindowPropertyChanged(aura::Window* window, | 123 void OnWindowPropertyChanged(aura::Window* window, |
| 117 const void* key, | 124 const void* key, |
| 118 intptr_t old) override; | 125 intptr_t old) override; |
| 119 void OnWindowBoundsChanged(aura::Window* window, | 126 void OnWindowBoundsChanged(aura::Window* window, |
| 120 const gfx::Rect& old_bounds, | 127 const gfx::Rect& old_bounds, |
| 121 const gfx::Rect& new_bounds) override; | 128 const gfx::Rect& new_bounds) override; |
| 122 void OnWindowDestroying(aura::Window* window) override; | 129 void OnWindowDestroying(aura::Window* window) override; |
| 130 void OnWindowVisibilityChanging(aura::Window* window, bool visible) override; |
| 123 | 131 |
| 124 aura::Window* window_; | 132 aura::Window* window_; |
| 125 | 133 |
| 126 base::ObserverList<WmWindowObserver> observers_; | 134 base::ObserverList<WmWindowObserver> observers_; |
| 127 | 135 |
| 128 DISALLOW_COPY_AND_ASSIGN(WmWindowAura); | 136 DISALLOW_COPY_AND_ASSIGN(WmWindowAura); |
| 129 }; | 137 }; |
| 130 | 138 |
| 131 } // namespace wm | 139 } // namespace wm |
| 132 } // namespace ash | 140 } // namespace ash |
| 133 | 141 |
| 134 #endif // ASH_WM_AURA_WM_WINDOW_AURA_H_ | 142 #endif // ASH_WM_AURA_WM_WINDOW_AURA_H_ |
| OLD | NEW |