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 #include "ash/wm/property_util.h" | 5 #include "ash/wm/property_util.h" |
6 | 6 |
7 #include "ash/ash_export.h" | |
8 #include "ash/root_window_settings.h" | |
9 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
10 #include "ash/wm/window_properties.h" | 8 #include "ash/wm/window_properties.h" |
11 #include "ash/wm/window_util.h" | |
12 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
13 #include "ui/aura/root_window.h" | |
14 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
15 #include "ui/base/ui_base_types.h" | 11 #include "ui/base/ui_base_types.h" |
16 #include "ui/gfx/rect.h" | 12 #include "ui/gfx/rect.h" |
17 | 13 |
18 namespace ash { | 14 namespace ash { |
19 | 15 |
20 void SetRestoreBoundsInScreen(aura::Window* window, const gfx::Rect& bounds) { | 16 void SetRestoreBoundsInScreen(aura::Window* window, const gfx::Rect& bounds) { |
21 window->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds)); | 17 window->SetProperty(aura::client::kRestoreBoundsKey, new gfx::Rect(bounds)); |
22 } | 18 } |
23 | 19 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } | 54 } |
59 | 55 |
60 void SetWindowAlwaysRestoresToRestoreBounds(aura::Window* window, bool value) { | 56 void SetWindowAlwaysRestoresToRestoreBounds(aura::Window* window, bool value) { |
61 window->SetProperty(internal::kWindowRestoresToRestoreBounds, value); | 57 window->SetProperty(internal::kWindowRestoresToRestoreBounds, value); |
62 } | 58 } |
63 | 59 |
64 bool GetWindowAlwaysRestoresToRestoreBounds(const aura::Window* window) { | 60 bool GetWindowAlwaysRestoresToRestoreBounds(const aura::Window* window) { |
65 return window->GetProperty(internal::kWindowRestoresToRestoreBounds); | 61 return window->GetProperty(internal::kWindowRestoresToRestoreBounds); |
66 } | 62 } |
67 | 63 |
68 internal::RootWindowController* GetRootWindowController( | |
69 const aura::RootWindow* root_window) { | |
70 return root_window ? | |
71 internal::GetRootWindowSettings(root_window)->controller : NULL; | |
72 } | |
73 | |
74 void SetRootWindowController(aura::RootWindow* root_window, | |
75 internal::RootWindowController* controller) { | |
76 internal::GetRootWindowSettings(root_window)->controller = controller; | |
77 } | |
78 | |
79 } // namespace ash | 64 } // namespace ash |
OLD | NEW |