OLD | NEW |
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 28 matching lines...) Expand all Loading... |
39 // Retrieves the activatable window for |window|. If |window| is activatable, | 39 // Retrieves the activatable window for |window|. If |window| is activatable, |
40 // this will just return it, otherwise it will climb the parent/transient parent | 40 // this will just return it, otherwise it will climb the parent/transient parent |
41 // chain looking for a window that is activatable, per the ActivationController. | 41 // chain looking for a window that is activatable, per the ActivationController. |
42 // If you're looking for a function to get the activatable "top level" window, | 42 // If you're looking for a function to get the activatable "top level" window, |
43 // this is probably what you're looking for. | 43 // this is probably what you're looking for. |
44 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); | 44 ASH_EXPORT aura::Window* GetActivatableWindow(aura::Window* window); |
45 | 45 |
46 // Returns true if |window|'s location can be controlled by the user. | 46 // Returns true if |window|'s location can be controlled by the user. |
47 ASH_EXPORT bool IsWindowUserPositionable(aura::Window* window); | 47 ASH_EXPORT bool IsWindowUserPositionable(aura::Window* window); |
48 | 48 |
49 // Moves the window to the center of the display. | |
50 ASH_EXPORT void CenterWindow(aura::Window* window); | |
51 | |
52 // Pins the window on top of other windows. | 49 // Pins the window on top of other windows. |
53 ASH_EXPORT void PinWindow(aura::Window* window); | 50 ASH_EXPORT void PinWindow(aura::Window* window); |
54 | 51 |
55 // Moves |window| to the root window where the |event| occured if it is not | 52 // Moves |window| to the root window where the |event| occured if it is not |
56 // already in the same root window. Returns true if |window| was moved. | 53 // already in the same root window. Returns true if |window| was moved. |
57 ASH_EXPORT bool MoveWindowToEventRoot(aura::Window* window, | 54 ASH_EXPORT bool MoveWindowToEventRoot(aura::Window* window, |
58 const ui::Event& event); | 55 const ui::Event& event); |
59 | 56 |
60 // Snap the window's layer to physical pixel boundary. | 57 // Snap the window's layer to physical pixel boundary. |
61 void SnapWindowToPixelBoundary(aura::Window* window); | 58 void SnapWindowToPixelBoundary(aura::Window* window); |
62 | 59 |
63 // Mark the container window so that InstallSnapLayoutManagerToContainers | 60 // Mark the container window so that InstallSnapLayoutManagerToContainers |
64 // installs the SnapToPixelLayoutManager. | 61 // installs the SnapToPixelLayoutManager. |
65 ASH_EXPORT void SetSnapsChildrenToPhysicalPixelBoundary( | 62 ASH_EXPORT void SetSnapsChildrenToPhysicalPixelBoundary( |
66 aura::Window* container); | 63 aura::Window* container); |
67 | 64 |
68 // Traverse the |container| tree and installs SnapToPixelLayoutManager. | 65 // Traverse the |container| tree and installs SnapToPixelLayoutManager. |
69 void InstallSnapLayoutManagerToContainers(aura::Window* container); | 66 void InstallSnapLayoutManagerToContainers(aura::Window* container); |
70 | 67 |
71 } // namespace wm | 68 } // namespace wm |
72 } // namespace ash | 69 } // namespace ash |
73 | 70 |
74 #endif // ASH_WM_WINDOW_UTIL_H_ | 71 #endif // ASH_WM_WINDOW_UTIL_H_ |
OLD | NEW |