| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 namespace aura { | 9 namespace aura { |
| 10 class Window; | 10 class Window; |
| 11 } | 11 } |
| 12 | 12 |
| 13 namespace gfx { | 13 namespace gfx { |
| 14 class Rect; | 14 class Rect; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace aura_shell { | 17 namespace ash { |
| 18 | 18 |
| 19 // Sets the restore bounds property on |window|. Deletes existing bounds value | 19 // Sets the restore bounds property on |window|. Deletes existing bounds value |
| 20 // if exists. | 20 // if exists. |
| 21 void SetRestoreBounds(aura::Window* window, const gfx::Rect& bounds); | 21 void SetRestoreBounds(aura::Window* window, const gfx::Rect& bounds); |
| 22 | 22 |
| 23 // Same as SetRestoreBounds(), but does nothing if the restore bounds have | 23 // Same as SetRestoreBounds(), but does nothing if the restore bounds have |
| 24 // already been set. The bounds used are the bounds of the window. | 24 // already been set. The bounds used are the bounds of the window. |
| 25 void SetRestoreBoundsIfNotSet(aura::Window* window); | 25 void SetRestoreBoundsIfNotSet(aura::Window* window); |
| 26 | 26 |
| 27 // Returns the restore bounds property on |window|. NULL if the | 27 // Returns the restore bounds property on |window|. NULL if the |
| 28 // restore bounds property does not exist for |window|. |window| | 28 // restore bounds property does not exist for |window|. |window| |
| 29 // owns the bounds object. | 29 // owns the bounds object. |
| 30 const gfx::Rect* GetRestoreBounds(aura::Window* window); | 30 const gfx::Rect* GetRestoreBounds(aura::Window* window); |
| 31 | 31 |
| 32 // Deletes and clears the restore bounds property on |window|. | 32 // Deletes and clears the restore bounds property on |window|. |
| 33 void ClearRestoreBounds(aura::Window* window); | 33 void ClearRestoreBounds(aura::Window* window); |
| 34 | 34 |
| 35 } | 35 } |
| 36 | 36 |
| 37 #endif // ASH_WM_PROPERTY_UTIL_H_ | 37 #endif // ASH_WM_PROPERTY_UTIL_H_ |
| OLD | NEW |