Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: ash/wm/window_positioning_utils.h

Issue 2908433005: [mus+ash] Removes WmWindow from window_positioning_utils (Closed)
Patch Set: Removes WmWindow from window_positioning_utils (exo) Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_WINDOW_POSITIONING_UTILS_H_ 5 #ifndef ASH_WM_WINDOW_POSITIONING_UTILS_H_
6 #define ASH_WM_WINDOW_POSITIONING_UTILS_H_ 6 #define ASH_WM_WINDOW_POSITIONING_UTILS_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 9
10 namespace aura { 10 namespace aura {
11 class Window; 11 class Window;
12 } 12 }
13 13
14 namespace display { 14 namespace display {
15 class Display; 15 class Display;
16 } 16 }
17 17
18 namespace gfx { 18 namespace gfx {
19 class Rect; 19 class Rect;
20 class Size; 20 class Size;
21 } 21 }
22 22
23 namespace ash { 23 namespace ash {
24 24
25 class WmWindow;
26
27 namespace wm { 25 namespace wm {
28 26
29 // We force at least this many DIPs for any window on the screen. 27 // We force at least this many DIPs for any window on the screen.
30 const int kMinimumOnScreenArea = 25; 28 const int kMinimumOnScreenArea = 25;
31 29
32 // Adjusts |bounds| so that the size does not exceed |max_size|. 30 // Adjusts |bounds| so that the size does not exceed |max_size|.
33 ASH_EXPORT void AdjustBoundsSmallerThan(const gfx::Size& max_size, 31 ASH_EXPORT void AdjustBoundsSmallerThan(const gfx::Size& max_size,
34 gfx::Rect* bounds); 32 gfx::Rect* bounds);
35 33
36 // Move the given bounds inside the given |visible_area| in parent coordinates, 34 // Move the given bounds inside the given |visible_area| in parent coordinates,
(...skipping 16 matching lines...) Expand all
53 // coordinates. 51 // coordinates.
54 ASH_EXPORT gfx::Rect GetDefaultLeftSnappedWindowBoundsInParent( 52 ASH_EXPORT gfx::Rect GetDefaultLeftSnappedWindowBoundsInParent(
55 aura::Window* window); 53 aura::Window* window);
56 54
57 // Returns the bounds of a right snapped window with default width in parent 55 // Returns the bounds of a right snapped window with default width in parent
58 // coordinates. 56 // coordinates.
59 ASH_EXPORT gfx::Rect GetDefaultRightSnappedWindowBoundsInParent( 57 ASH_EXPORT gfx::Rect GetDefaultRightSnappedWindowBoundsInParent(
60 aura::Window* window); 58 aura::Window* window);
61 59
62 // Moves the window to the center of the display. 60 // Moves the window to the center of the display.
63 ASH_EXPORT void CenterWindow(WmWindow* window); 61 ASH_EXPORT void CenterWindow(aura::Window* window);
64 62
65 // Sets the bounds of |window| to |bounds_in_screen|. This may move |window| 63 // Sets the bounds of |window| to |bounds_in_screen|. This may move |window|
66 // to |display| if necessary. 64 // to |display| if necessary.
67 ASH_EXPORT void SetBoundsInScreen(WmWindow* window, 65 ASH_EXPORT void SetBoundsInScreen(aura::Window* window,
68 const gfx::Rect& bounds_in_screen, 66 const gfx::Rect& bounds_in_screen,
69 const display::Display& display); 67 const display::Display& display);
70 68
71 } // namespace wm 69 } // namespace wm
72 } // namespace ash 70 } // namespace ash
73 71
74 #endif // ASH_WM_WINDOW_POSITIONING_UTILS_H_ 72 #endif // ASH_WM_WINDOW_POSITIONING_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698