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" |
11 | 11 |
12 namespace aura { | 12 namespace aura { |
13 class RootWindow; | 13 class RootWindow; |
14 class Window; | 14 class Window; |
15 } | 15 } |
16 | 16 |
17 namespace gfx { | 17 namespace gfx { |
18 class Rect; | 18 class Rect; |
19 } | 19 } |
20 | 20 |
21 namespace ui { | 21 namespace ui { |
| 22 class Event; |
22 class Layer; | 23 class Layer; |
23 } | 24 } |
24 | 25 |
25 namespace ash { | 26 namespace ash { |
26 // We force at least this many DIPs for any window on the screen. | 27 // We force at least this many DIPs for any window on the screen. |
27 const int kMinimumOnScreenArea = 10; | 28 const int kMinimumOnScreenArea = 10; |
28 | 29 |
29 namespace wm { | 30 namespace wm { |
30 | 31 |
31 // Convenience setters/getters for |aura::client::kRootWindowActiveWindow|. | 32 // Convenience setters/getters for |aura::client::kRootWindowActiveWindow|. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 gfx::Rect* bounds); | 118 gfx::Rect* bounds); |
118 | 119 |
119 // Move the given bounds inside the given work area, including a safety margin | 120 // Move the given bounds inside the given work area, including a safety margin |
120 // given by |min_width| and |min_height|. | 121 // given by |min_width| and |min_height|. |
121 ASH_EXPORT void AdjustBoundsToEnsureWindowVisibility( | 122 ASH_EXPORT void AdjustBoundsToEnsureWindowVisibility( |
122 const gfx::Rect& work_area, | 123 const gfx::Rect& work_area, |
123 int min_width, | 124 int min_width, |
124 int min_height, | 125 int min_height, |
125 gfx::Rect* bounds); | 126 gfx::Rect* bounds); |
126 | 127 |
| 128 // Move |window| to the root window where the |event| occured if it is not |
| 129 // already in the same root window. |
| 130 ASH_EXPORT void MoveWindowToEventRoot(aura::Window* window, |
| 131 const ui::Event& event); |
| 132 |
127 } // namespace wm | 133 } // namespace wm |
128 } // namespace ash | 134 } // namespace ash |
129 | 135 |
130 #endif // ASH_WM_WINDOW_UTIL_H_ | 136 #endif // ASH_WM_WINDOW_UTIL_H_ |
OLD | NEW |