| 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_COMMON_WM_WINDOW_H_ | 5 #ifndef ASH_WM_COMMON_WM_WINDOW_H_ |
| 6 #define ASH_WM_COMMON_WM_WINDOW_H_ | 6 #define ASH_WM_COMMON_WM_WINDOW_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "ui/base/ui_base_types.h" | 13 #include "ui/base/ui_base_types.h" |
| 14 #include "ui/wm/core/window_animations.h" | 14 #include "ui/wm/core/window_animations.h" |
| 15 #include "ui/wm/public/window_types.h" | 15 #include "ui/wm/public/window_types.h" |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class Display; | 18 class Display; |
| 19 class Point; | 19 class Point; |
| 20 class Rect; | 20 class Rect; |
| 21 class Size; | 21 class Size; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace display { |
| 25 using Display = gfx::Display; |
| 26 } |
| 27 |
| 24 namespace ui { | 28 namespace ui { |
| 25 class Layer; | 29 class Layer; |
| 26 } | 30 } |
| 27 | 31 |
| 28 namespace views { | 32 namespace views { |
| 29 class Widget; | 33 class Widget; |
| 30 } | 34 } |
| 31 | 35 |
| 32 namespace ash { | 36 namespace ash { |
| 33 namespace wm { | 37 namespace wm { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 63 // See wm_shell_window_ids.h for list of known ids. | 67 // See wm_shell_window_ids.h for list of known ids. |
| 64 virtual void SetShellWindowId(int id) = 0; | 68 virtual void SetShellWindowId(int id) = 0; |
| 65 virtual int GetShellWindowId() = 0; | 69 virtual int GetShellWindowId() = 0; |
| 66 virtual WmWindow* GetChildByShellWindowId(int id) = 0; | 70 virtual WmWindow* GetChildByShellWindowId(int id) = 0; |
| 67 | 71 |
| 68 virtual ui::wm::WindowType GetType() const = 0; | 72 virtual ui::wm::WindowType GetType() const = 0; |
| 69 | 73 |
| 70 // TODO(sky): seems like this shouldn't be exposed. | 74 // TODO(sky): seems like this shouldn't be exposed. |
| 71 virtual ui::Layer* GetLayer() = 0; | 75 virtual ui::Layer* GetLayer() = 0; |
| 72 | 76 |
| 73 virtual gfx::Display GetDisplayNearestWindow() = 0; | 77 virtual display::Display GetDisplayNearestWindow() = 0; |
| 74 | 78 |
| 75 virtual bool HasNonClientArea() = 0; | 79 virtual bool HasNonClientArea() = 0; |
| 76 virtual int GetNonClientComponent(const gfx::Point& location) = 0; | 80 virtual int GetNonClientComponent(const gfx::Point& location) = 0; |
| 77 | 81 |
| 78 virtual gfx::Point ConvertPointToTarget(const WmWindow* target, | 82 virtual gfx::Point ConvertPointToTarget(const WmWindow* target, |
| 79 const gfx::Point& point) const = 0; | 83 const gfx::Point& point) const = 0; |
| 80 virtual gfx::Point ConvertPointToScreen(const gfx::Point& point) const = 0; | 84 virtual gfx::Point ConvertPointToScreen(const gfx::Point& point) const = 0; |
| 81 virtual gfx::Point ConvertPointFromScreen(const gfx::Point& point) const = 0; | 85 virtual gfx::Point ConvertPointFromScreen(const gfx::Point& point) const = 0; |
| 82 virtual gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const = 0; | 86 virtual gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const = 0; |
| 83 virtual gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const = 0; | 87 virtual gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const = 0; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 virtual void Animate(::wm::WindowAnimationType type) = 0; | 131 virtual void Animate(::wm::WindowAnimationType type) = 0; |
| 128 | 132 |
| 129 virtual void SetBounds(const gfx::Rect& bounds) = 0; | 133 virtual void SetBounds(const gfx::Rect& bounds) = 0; |
| 130 virtual void SetBoundsWithTransitionDelay(const gfx::Rect& bounds, | 134 virtual void SetBoundsWithTransitionDelay(const gfx::Rect& bounds, |
| 131 base::TimeDelta delta) = 0; | 135 base::TimeDelta delta) = 0; |
| 132 // Sets the bounds in such a way that LayoutManagers are circumvented. | 136 // Sets the bounds in such a way that LayoutManagers are circumvented. |
| 133 virtual void SetBoundsDirect(const gfx::Rect& bounds) = 0; | 137 virtual void SetBoundsDirect(const gfx::Rect& bounds) = 0; |
| 134 virtual void SetBoundsDirectAnimated(const gfx::Rect& bounds) = 0; | 138 virtual void SetBoundsDirectAnimated(const gfx::Rect& bounds) = 0; |
| 135 virtual void SetBoundsDirectCrossFade(const gfx::Rect& bounds) = 0; | 139 virtual void SetBoundsDirectCrossFade(const gfx::Rect& bounds) = 0; |
| 136 virtual void SetBoundsInScreen(const gfx::Rect& bounds_in_screen, | 140 virtual void SetBoundsInScreen(const gfx::Rect& bounds_in_screen, |
| 137 const gfx::Display& dst_display) = 0; | 141 const display::Display& dst_display) = 0; |
| 138 virtual gfx::Rect GetBoundsInScreen() const = 0; | 142 virtual gfx::Rect GetBoundsInScreen() const = 0; |
| 139 virtual const gfx::Rect& GetBounds() const = 0; | 143 virtual const gfx::Rect& GetBounds() const = 0; |
| 140 virtual gfx::Rect GetTargetBounds() = 0; | 144 virtual gfx::Rect GetTargetBounds() = 0; |
| 141 | 145 |
| 142 virtual void ClearRestoreBounds() = 0; | 146 virtual void ClearRestoreBounds() = 0; |
| 143 virtual void SetRestoreBoundsInScreen(const gfx::Rect& bounds) = 0; | 147 virtual void SetRestoreBoundsInScreen(const gfx::Rect& bounds) = 0; |
| 144 virtual gfx::Rect GetRestoreBoundsInScreen() const = 0; | 148 virtual gfx::Rect GetRestoreBoundsInScreen() const = 0; |
| 145 | 149 |
| 146 virtual void OnWMEvent(const wm::WMEvent* event) = 0; | 150 virtual void OnWMEvent(const wm::WMEvent* event) = 0; |
| 147 | 151 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 virtual void RemoveObserver(WmWindowObserver* observer) = 0; | 205 virtual void RemoveObserver(WmWindowObserver* observer) = 0; |
| 202 | 206 |
| 203 protected: | 207 protected: |
| 204 virtual ~WmWindow() {} | 208 virtual ~WmWindow() {} |
| 205 }; | 209 }; |
| 206 | 210 |
| 207 } // namespace wm | 211 } // namespace wm |
| 208 } // namespace ash | 212 } // namespace ash |
| 209 | 213 |
| 210 #endif // ASH_WM_COMMON_WM_WINDOW_H_ | 214 #endif // ASH_WM_COMMON_WM_WINDOW_H_ |
| OLD | NEW |