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_PROPERTY_UTIL_H_ | 5 #ifndef ASH_WM_PROPERTY_UTIL_H_ |
6 #define ASH_WM_PROPERTY_UTIL_H_ | 6 #define ASH_WM_PROPERTY_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
10 | 10 |
11 namespace aura { | 11 namespace aura { |
12 class Window; | 12 class Window; |
| 13 template<typename T> |
| 14 struct WindowProperty; |
13 } | 15 } |
14 | 16 |
15 namespace gfx { | 17 namespace gfx { |
16 class Rect; | 18 class Rect; |
17 } | 19 } |
18 | 20 |
19 namespace ash { | 21 namespace ash { |
20 | 22 |
21 // Sets the restore bounds property on |window|. Deletes existing bounds value | 23 // Sets the restore bounds property on |window|. Deletes existing bounds value |
22 // if exists. | 24 // if exists. |
23 ASH_EXPORT void SetRestoreBounds(aura::Window* window, const gfx::Rect& bounds); | 25 ASH_EXPORT void SetRestoreBounds(aura::Window* window, const gfx::Rect& bounds); |
24 | 26 |
25 // Same as SetRestoreBounds(), but does nothing if the restore bounds have | 27 // Same as SetRestoreBounds(), but does nothing if the restore bounds have |
26 // already been set. The bounds used are the bounds of the window. | 28 // already been set. The bounds used are the bounds of the window. |
27 ASH_EXPORT void SetRestoreBoundsIfNotSet(aura::Window* window); | 29 ASH_EXPORT void SetRestoreBoundsIfNotSet(aura::Window* window); |
28 | 30 |
29 // Returns the restore bounds property on |window|. NULL if the | 31 // Returns the restore bounds property on |window|. NULL if the |
30 // restore bounds property does not exist for |window|. |window| | 32 // restore bounds property does not exist for |window|. |window| |
31 // owns the bounds object. | 33 // owns the bounds object. |
32 ASH_EXPORT const gfx::Rect* GetRestoreBounds(aura::Window* window); | 34 ASH_EXPORT const gfx::Rect* GetRestoreBounds(aura::Window* window); |
33 | 35 |
34 // Deletes and clears the restore bounds property on |window|. | 36 // Deletes and clears the restore bounds property on |window|. |
35 ASH_EXPORT void ClearRestoreBounds(aura::Window* window); | 37 ASH_EXPORT void ClearRestoreBounds(aura::Window* window); |
36 | 38 |
37 // Toggles the maximized state of the specified window. | 39 // Toggles the maximized state of the specified window. |
38 ASH_EXPORT void ToggleMaximizedState(aura::Window* window); | 40 ASH_EXPORT void ToggleMaximizedState(aura::Window* window); |
39 | 41 |
| 42 ASH_EXPORT extern const aura::WindowProperty<bool>* const |
| 43 kWindowTrackedByWorkspaceSplitPropKey; |
| 44 |
| 45 // Sets whether the specified window is tracked by workspace code. Default is |
| 46 // true. If set to false the workspace does not switch the current workspace, |
| 47 // nor does it attempt to impose constraints on the bounds of the window. This |
| 48 // is intended for tab dragging. |
| 49 ASH_EXPORT void SetTrackedByWorkspace(aura::Window* window, bool value); |
| 50 ASH_EXPORT bool GetTrackedByWorkspace(aura::Window* window); |
| 51 |
40 } | 52 } |
41 | 53 |
42 #endif // ASH_WM_PROPERTY_UTIL_H_ | 54 #endif // ASH_WM_PROPERTY_UTIL_H_ |
OLD | NEW |