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_COMMON_WM_WINDOW_POSITIONING_UTILS_H_ | 5 #ifndef ASH_COMMON_WM_WINDOW_POSITIONING_UTILS_H_ |
6 #define ASH_COMMON_WM_WINDOW_POSITIONING_UTILS_H_ | 6 #define ASH_COMMON_WM_WINDOW_POSITIONING_UTILS_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 | 9 |
| 10 namespace display { |
| 11 class Display; |
| 12 } |
| 13 |
10 namespace gfx { | 14 namespace gfx { |
11 class Rect; | 15 class Rect; |
12 class Size; | 16 class Size; |
13 } | 17 } |
14 | 18 |
15 namespace ash { | 19 namespace ash { |
16 | 20 |
17 class WmWindow; | 21 class WmWindow; |
18 | 22 |
19 namespace wm { | 23 namespace wm { |
(...skipping 27 matching lines...) Expand all Loading... |
47 WmWindow* window); | 51 WmWindow* window); |
48 | 52 |
49 // Returns the bounds of a right snapped window with default width in parent | 53 // Returns the bounds of a right snapped window with default width in parent |
50 // coordinates. | 54 // coordinates. |
51 ASH_EXPORT gfx::Rect GetDefaultRightSnappedWindowBoundsInParent( | 55 ASH_EXPORT gfx::Rect GetDefaultRightSnappedWindowBoundsInParent( |
52 WmWindow* window); | 56 WmWindow* window); |
53 | 57 |
54 // Moves the window to the center of the display. | 58 // Moves the window to the center of the display. |
55 ASH_EXPORT void CenterWindow(WmWindow* window); | 59 ASH_EXPORT void CenterWindow(WmWindow* window); |
56 | 60 |
| 61 // Sets the bounds of |window| to |bounds_in_screen|. This may move |window| |
| 62 // to |display| if necessary. |
| 63 ASH_EXPORT void SetBoundsInScreen(WmWindow* window, |
| 64 const gfx::Rect& bounds_in_screen, |
| 65 const display::Display& display); |
| 66 |
57 } // namespace wm | 67 } // namespace wm |
58 } // namespace ash | 68 } // namespace ash |
59 | 69 |
60 #endif // ASH_COMMON_WM_WINDOW_POSITIONING_UTILS_H_ | 70 #endif // ASH_COMMON_WM_WINDOW_POSITIONING_UTILS_H_ |
OLD | NEW |