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

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

Issue 1901773002: Removes most of aura dependencies from DefaultState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wm_window_positioner
Patch Set: nit and merge Created 4 years, 8 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/window_state_util.cc ('k') | ash/wm/window_util.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UTIL_H_ 5 #ifndef ASH_WM_WINDOW_UTIL_H_
6 #define ASH_WM_WINDOW_UTIL_H_ 6 #define ASH_WM_WINDOW_UTIL_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/base/ui_base_types.h" 10 #include "ui/base/ui_base_types.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // TODO(oshima): remove this. 45 // TODO(oshima): remove this.
46 ASH_EXPORT bool IsWindowMinimized(aura::Window* window); 46 ASH_EXPORT bool IsWindowMinimized(aura::Window* window);
47 47
48 // Returns true if |window|'s location can be controlled by the user. 48 // Returns true if |window|'s location can be controlled by the user.
49 ASH_EXPORT bool IsWindowUserPositionable(aura::Window* window); 49 ASH_EXPORT bool IsWindowUserPositionable(aura::Window* window);
50 50
51 // Moves the window to the center of the display. 51 // Moves the window to the center of the display.
52 ASH_EXPORT void CenterWindow(aura::Window* window); 52 ASH_EXPORT void CenterWindow(aura::Window* window);
53 53
54 ASH_EXPORT gfx::Rect GetDefaultLeftSnappedWindowBoundsInParent(
55 wm::WmWindow* window);
56 ASH_EXPORT gfx::Rect GetDefaultRightSnappedWindowBoundsInParent(
57 wm::WmWindow* window);
58
59 // Returns the bounds of a left snapped window with default width in parent
60 // coordinates.
61 ASH_EXPORT gfx::Rect GetDefaultLeftSnappedWindowBoundsInParent(
62 aura::Window* window);
63
64 // Returns the bounds of a right snapped window with default width in parent
65 // coordinates.
66 ASH_EXPORT gfx::Rect GetDefaultRightSnappedWindowBoundsInParent(
67 aura::Window* window);
68
69 // Moves |window| to the root window where the |event| occured if it is not 54 // Moves |window| to the root window where the |event| occured if it is not
70 // already in the same root window. Returns true if |window| was moved. 55 // already in the same root window. Returns true if |window| was moved.
71 ASH_EXPORT bool MoveWindowToEventRoot(aura::Window* window, 56 ASH_EXPORT bool MoveWindowToEventRoot(aura::Window* window,
72 const ui::Event& event); 57 const ui::Event& event);
73 58
74 // Changes the parent of a |child| and all its transient children that are
75 // themselves children of |old_parent| to |new_parent|.
76 void ReparentChildWithTransientChildren(aura::Window* child,
77 aura::Window* old_parent,
78 aura::Window* new_parent);
79
80 // Changes the parent of all transient children of a |child| to |new_parent|.
81 // Does not change parent of the transient children that are not themselves
82 // children of |old_parent|.
83 void ReparentTransientChildrenOfChild(aura::Window* child,
84 aura::Window* old_parent,
85 aura::Window* new_parent);
86
87 // Snap the window's layer to physical pixel boundary. 59 // Snap the window's layer to physical pixel boundary.
88 void SnapWindowToPixelBoundary(aura::Window* window); 60 void SnapWindowToPixelBoundary(aura::Window* window);
89 61
90 // Mark the container window so that InstallSnapLayoutManagerToContainers 62 // Mark the container window so that InstallSnapLayoutManagerToContainers
91 // installs the SnapToPixelLayoutManager. 63 // installs the SnapToPixelLayoutManager.
92 ASH_EXPORT void SetSnapsChildrenToPhysicalPixelBoundary( 64 ASH_EXPORT void SetSnapsChildrenToPhysicalPixelBoundary(
93 aura::Window* container); 65 aura::Window* container);
94 66
95 // Traverse the |container| tree and installs SnapToPixelLayoutManager. 67 // Traverse the |container| tree and installs SnapToPixelLayoutManager.
96 void InstallSnapLayoutManagerToContainers(aura::Window* container); 68 void InstallSnapLayoutManagerToContainers(aura::Window* container);
97 69
98 } // namespace wm 70 } // namespace wm
99 } // namespace ash 71 } // namespace ash
100 72
101 #endif // ASH_WM_WINDOW_UTIL_H_ 73 #endif // ASH_WM_WINDOW_UTIL_H_
OLDNEW
« no previous file with comments | « ash/wm/window_state_util.cc ('k') | ash/wm/window_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698