| 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 29 matching lines...) Expand all Loading... |
| 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 // Pins the window on top of other windows. | 49 // Pins the window on top of other windows. |
| 50 ASH_EXPORT void PinWindow(aura::Window* window); | 50 ASH_EXPORT void PinWindow(aura::Window* window, bool trusted); |
| 51 | 51 |
| 52 // 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 |
| 53 // 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. |
| 54 ASH_EXPORT bool MoveWindowToEventRoot(aura::Window* window, | 54 ASH_EXPORT bool MoveWindowToEventRoot(aura::Window* window, |
| 55 const ui::Event& event); | 55 const ui::Event& event); |
| 56 | 56 |
| 57 // Snap the window's layer to physical pixel boundary. | 57 // Snap the window's layer to physical pixel boundary. |
| 58 void SnapWindowToPixelBoundary(aura::Window* window); | 58 void SnapWindowToPixelBoundary(aura::Window* window); |
| 59 | 59 |
| 60 // Mark the container window so that InstallSnapLayoutManagerToContainers | 60 // Mark the container window so that InstallSnapLayoutManagerToContainers |
| 61 // installs the SnapToPixelLayoutManager. | 61 // installs the SnapToPixelLayoutManager. |
| 62 ASH_EXPORT void SetSnapsChildrenToPhysicalPixelBoundary( | 62 ASH_EXPORT void SetSnapsChildrenToPhysicalPixelBoundary( |
| 63 aura::Window* container); | 63 aura::Window* container); |
| 64 | 64 |
| 65 // Traverse the |container| tree and installs SnapToPixelLayoutManager. | 65 // Traverse the |container| tree and installs SnapToPixelLayoutManager. |
| 66 void InstallSnapLayoutManagerToContainers(aura::Window* container); | 66 void InstallSnapLayoutManagerToContainers(aura::Window* container); |
| 67 | 67 |
| 68 } // namespace wm | 68 } // namespace wm |
| 69 } // namespace ash | 69 } // namespace ash |
| 70 | 70 |
| 71 #endif // ASH_WM_WINDOW_UTIL_H_ | 71 #endif // ASH_WM_WINDOW_UTIL_H_ |
| OLD | NEW |