OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/aura_shell/property_util.h" |
| 6 |
| 7 #include "ui/aura/aura_constants.h" |
| 8 #include "ui/aura/window.h" |
| 9 #include "ui/base/ui_base_types.h" |
| 10 #include "ui/gfx/rect.h" |
| 11 |
| 12 namespace aura_shell { |
| 13 |
| 14 void SetRestoreBounds(aura::Window* window, const gfx::Rect& bounds) { |
| 15 delete GetRestoreBounds(window); |
| 16 window->SetProperty(aura::kRestoreBoundsKey, new gfx::Rect(bounds)); |
| 17 } |
| 18 |
| 19 const gfx::Rect* GetRestoreBounds(aura::Window* window) { |
| 20 return reinterpret_cast<gfx::Rect*>( |
| 21 window->GetProperty(aura::kRestoreBoundsKey)); |
| 22 } |
| 23 |
| 24 void ClearRestoreBounds(aura::Window* window) { |
| 25 delete GetRestoreBounds(window); |
| 26 window->SetProperty(aura::kRestoreBoundsKey, NULL); |
| 27 } |
| 28 |
| 29 } |
OLD | NEW |