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_PROPERTIES_H_ | 5 #ifndef ASH_WM_WINDOW_PROPERTIES_H_ |
6 #define ASH_WM_WINDOW_PROPERTIES_H_ | 6 #define ASH_WM_WINDOW_PROPERTIES_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/wm/property_util.h" | |
10 #include "ui/aura/window.h" | |
11 #include "ui/base/ui_base_types.h" | 9 #include "ui/base/ui_base_types.h" |
12 | 10 |
13 namespace gfx { | 11 namespace aura { |
14 class Rect; | 12 class Window; |
| 13 |
| 14 template<typename T> |
| 15 struct WindowProperty; |
15 } | 16 } |
16 | 17 |
17 namespace ash { | 18 namespace ash { |
| 19 namespace wm { |
| 20 class WindowState; |
| 21 } // namespace wm |
18 namespace internal { | 22 namespace internal { |
19 | 23 |
20 // Shell-specific window property keys. | 24 // Shell-specific window property keys. |
21 | 25 |
22 // Alphabetical sort. | 26 // Alphabetical sort. |
23 | 27 |
24 // A property key to suppress the cross-fade animation for the transition to | 28 // A property key to suppress the cross-fade animation for the transition to |
25 // the fullscreen state. | 29 // the fullscreen state. |
26 extern const aura::WindowProperty<bool>* const kAnimateToFullscreenKey; | 30 extern const aura::WindowProperty<bool>* const kAnimateToFullscreenKey; |
27 | 31 |
28 // A property key to indicate whether there is any chrome at all that cannot be | 32 // A property key to indicate whether there is any chrome at all that cannot be |
29 // hidden when the window is fullscreen. This is unrelated to whether the full | 33 // hidden when the window is fullscreen. This is unrelated to whether the full |
30 // chrome can be revealed by hovering the mouse at the top of the screen. | 34 // chrome can be revealed by hovering the mouse at the top of the screen. |
31 ASH_EXPORT extern const aura::WindowProperty<bool>* const | 35 ASH_EXPORT extern const aura::WindowProperty<bool>* const |
32 kFullscreenUsesMinimalChromeKey; | 36 kFullscreenUsesMinimalChromeKey; |
33 | 37 |
34 // If this is set to true, the window stays in the same root window | 38 // If this is set to true, the window stays in the same root window |
35 // even if the bounds outside of its root window is set. | 39 // even if the bounds outside of its root window is set. |
36 // This is exported as it's used in the tests. | 40 // This is exported as it's used in the tests. |
37 ASH_EXPORT extern const aura::WindowProperty<bool>* const | 41 ASH_EXPORT extern const aura::WindowProperty<bool>* const |
38 kStayInSameRootWindowKey; | 42 kStayInSameRootWindowKey; |
39 | 43 |
40 // A property to remember the window position which was set before the | |
41 // auto window position manager changed the window bounds, so that it can get | |
42 // restored when only this one window gets shown. | |
43 ASH_EXPORT extern const aura::WindowProperty<gfx::Rect*>* const | |
44 kPreAutoManagedWindowBoundsKey; | |
45 | |
46 // Property to tell if the container uses the screen coordinates. | 44 // Property to tell if the container uses the screen coordinates. |
47 extern const aura::WindowProperty<bool>* const kUsesScreenCoordinatesKey; | 45 extern const aura::WindowProperty<bool>* const kUsesScreenCoordinatesKey; |
48 | 46 |
49 // A property key to tell the workspace layout manager to always restore the | 47 // A property key to store WindowState in the window. The window state |
50 // window to the restore-bounds (false by default). | 48 // is owned by the window. |
51 extern const aura::WindowProperty<bool>* const kWindowRestoresToRestoreBounds; | 49 extern const aura::WindowProperty<wm::WindowState*>* const kWindowStateKey; |
52 | 50 |
53 // Alphabetical sort. | 51 // Alphabetical sort. |
54 | 52 |
55 } // namespace internal | 53 } // namespace internal |
56 } // namespace ash | 54 } // namespace ash |
57 | 55 |
58 #endif // ASH_WM_WINDOW_PROPERTIES_H_ | 56 #endif // ASH_WM_WINDOW_PROPERTIES_H_ |
OLD | NEW |