| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 // Maximizes |window|, which must not be NULL. | 56 // Maximizes |window|, which must not be NULL. |
| 57 ASH_EXPORT void MaximizeWindow(aura::Window* window); | 57 ASH_EXPORT void MaximizeWindow(aura::Window* window); |
| 58 | 58 |
| 59 // Minimizes |window|, which must not be NULL. | 59 // Minimizes |window|, which must not be NULL. |
| 60 ASH_EXPORT void MinimizeWindow(aura::Window* window); | 60 ASH_EXPORT void MinimizeWindow(aura::Window* window); |
| 61 | 61 |
| 62 // Restores |window|, which must not be NULL. | 62 // Restores |window|, which must not be NULL. |
| 63 ASH_EXPORT void RestoreWindow(aura::Window* window); | 63 ASH_EXPORT void RestoreWindow(aura::Window* window); |
| 64 | 64 |
| 65 // Maximizes or restores |window| based on its state. |window| must not be NULL. |
| 66 ASH_EXPORT void ToggleMaximizedWindow(aura::Window* window); |
| 67 |
| 65 // Moves the window to the center of the display. | 68 // Moves the window to the center of the display. |
| 66 ASH_EXPORT void CenterWindow(aura::Window* window); | 69 ASH_EXPORT void CenterWindow(aura::Window* window); |
| 67 | 70 |
| 68 // Returns the existing Layer for |window| (and all its descendants) and creates | 71 // Returns the existing Layer for |window| (and all its descendants) and creates |
| 69 // a new layer for |window| and all its descendants. This is intended for | 72 // a new layer for |window| and all its descendants. This is intended for |
| 70 // animations that want to animate between the existing visuals and a new window | 73 // animations that want to animate between the existing visuals and a new window |
| 71 // state. The caller owns the return value. | 74 // state. The caller owns the return value. |
| 72 // | 75 // |
| 73 // As a result of this |window| has freshly created layers, meaning the layers | 76 // As a result of this |window| has freshly created layers, meaning the layers |
| 74 // are all empty (nothing has been painted to them) and are sized to 0x0. Soon | 77 // are all empty (nothing has been painted to them) and are sized to 0x0. Soon |
| 75 // after this call you need to reset the bounds of the window. Or, you can pass | 78 // after this call you need to reset the bounds of the window. Or, you can pass |
| 76 // true as the second argument to let the function do that. | 79 // true as the second argument to let the function do that. |
| 77 ASH_EXPORT ui::Layer* RecreateWindowLayers(aura::Window* window, | 80 ASH_EXPORT ui::Layer* RecreateWindowLayers(aura::Window* window, |
| 78 bool set_bounds) WARN_UNUSED_RESULT; | 81 bool set_bounds) WARN_UNUSED_RESULT; |
| 79 | 82 |
| 80 // Deletes |layer| and all its child layers. | 83 // Deletes |layer| and all its child layers. |
| 81 ASH_EXPORT void DeepDeleteLayers(ui::Layer* layer); | 84 ASH_EXPORT void DeepDeleteLayers(ui::Layer* layer); |
| 82 | 85 |
| 83 } // namespace wm | 86 } // namespace wm |
| 84 } // namespace ash | 87 } // namespace ash |
| 85 | 88 |
| 86 #endif // ASH_WM_WINDOW_UTIL_H_ | 89 #endif // ASH_WM_WINDOW_UTIL_H_ |
| OLD | NEW |