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

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

Issue 2897993003: chromeos: converts WindowResizer to aura::Window (Closed)
Patch Set: remove include from 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
« no previous file with comments | « ash/wm/system_gesture_event_filter_unittest.cc ('k') | ash/wm/window_positioning_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
11 class Window;
12 }
13
10 namespace display { 14 namespace display {
11 class Display; 15 class Display;
12 } 16 }
13 17
14 namespace gfx { 18 namespace gfx {
15 class Rect; 19 class Rect;
16 class Size; 20 class Size;
17 } 21 }
18 22
19 namespace ash { 23 namespace ash {
(...skipping 21 matching lines...) Expand all
41 // Move the given bounds inside the given |visible_area| in parent coordinates, 45 // Move the given bounds inside the given |visible_area| in parent coordinates,
42 // including a safety margin given by |kMinimumOnScreenArea|. 46 // including a safety margin given by |kMinimumOnScreenArea|.
43 // This also ensures that the top of the bounds is visible. 47 // This also ensures that the top of the bounds is visible.
44 ASH_EXPORT void AdjustBoundsToEnsureMinimumWindowVisibility( 48 ASH_EXPORT void AdjustBoundsToEnsureMinimumWindowVisibility(
45 const gfx::Rect& visible_area, 49 const gfx::Rect& visible_area,
46 gfx::Rect* bounds); 50 gfx::Rect* bounds);
47 51
48 // Returns the bounds of a left snapped window with default width in parent 52 // Returns the bounds of a left snapped window with default width in parent
49 // coordinates. 53 // coordinates.
50 ASH_EXPORT gfx::Rect GetDefaultLeftSnappedWindowBoundsInParent( 54 ASH_EXPORT gfx::Rect GetDefaultLeftSnappedWindowBoundsInParent(
51 WmWindow* window); 55 aura::Window* window);
52 56
53 // Returns the bounds of a right snapped window with default width in parent 57 // Returns the bounds of a right snapped window with default width in parent
54 // coordinates. 58 // coordinates.
55 ASH_EXPORT gfx::Rect GetDefaultRightSnappedWindowBoundsInParent( 59 ASH_EXPORT gfx::Rect GetDefaultRightSnappedWindowBoundsInParent(
56 WmWindow* window); 60 aura::Window* window);
57 61
58 // Moves the window to the center of the display. 62 // Moves the window to the center of the display.
59 ASH_EXPORT void CenterWindow(WmWindow* window); 63 ASH_EXPORT void CenterWindow(WmWindow* window);
60 64
61 // Sets the bounds of |window| to |bounds_in_screen|. This may move |window| 65 // Sets the bounds of |window| to |bounds_in_screen|. This may move |window|
62 // to |display| if necessary. 66 // to |display| if necessary.
63 ASH_EXPORT void SetBoundsInScreen(WmWindow* window, 67 ASH_EXPORT void SetBoundsInScreen(WmWindow* window,
64 const gfx::Rect& bounds_in_screen, 68 const gfx::Rect& bounds_in_screen,
65 const display::Display& display); 69 const display::Display& display);
66 70
67 } // namespace wm 71 } // namespace wm
68 } // namespace ash 72 } // namespace ash
69 73
70 #endif // ASH_WM_WINDOW_POSITIONING_UTILS_H_ 74 #endif // ASH_WM_WINDOW_POSITIONING_UTILS_H_
OLDNEW
« no previous file with comments | « ash/wm/system_gesture_event_filter_unittest.cc ('k') | ash/wm/window_positioning_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698