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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <queue> | 8 #include <queue> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 wm::WindowState* state = wm::GetWindowState(window); | 168 wm::WindowState* state = wm::GetWindowState(window); |
169 gfx::Rect restore_bounds; | 169 gfx::Rect restore_bounds; |
170 const bool has_restore_bounds = state->HasRestoreBounds(); | 170 const bool has_restore_bounds = state->HasRestoreBounds(); |
171 | 171 |
172 const bool update_bounds = state->IsNormalOrSnapped() || state->IsMinimized(); | 172 const bool update_bounds = state->IsNormalOrSnapped() || state->IsMinimized(); |
173 gfx::Rect work_area_in_new_parent = | 173 gfx::Rect work_area_in_new_parent = |
174 ScreenUtil::GetDisplayWorkAreaBoundsInParent(new_parent); | 174 ScreenUtil::GetDisplayWorkAreaBoundsInParent(new_parent); |
175 | 175 |
176 gfx::Rect local_bounds; | 176 gfx::Rect local_bounds; |
177 if (update_bounds) { | 177 if (update_bounds) { |
178 local_bounds = state->window()->GetBounds(); | 178 local_bounds = state->window()->bounds(); |
179 MoveOriginRelativeToSize(src_size, dst_size, &local_bounds); | 179 MoveOriginRelativeToSize(src_size, dst_size, &local_bounds); |
180 local_bounds.AdjustToFit(work_area_in_new_parent); | 180 local_bounds.AdjustToFit(work_area_in_new_parent); |
181 } | 181 } |
182 | 182 |
183 if (has_restore_bounds) { | 183 if (has_restore_bounds) { |
184 restore_bounds = state->GetRestoreBoundsInParent(); | 184 restore_bounds = state->GetRestoreBoundsInParent(); |
185 MoveOriginRelativeToSize(src_size, dst_size, &restore_bounds); | 185 MoveOriginRelativeToSize(src_size, dst_size, &restore_bounds); |
186 restore_bounds.AdjustToFit(work_area_in_new_parent); | 186 restore_bounds.AdjustToFit(work_area_in_new_parent); |
187 } | 187 } |
188 | 188 |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1082 EnableTouchHudProjection(); | 1082 EnableTouchHudProjection(); |
1083 else | 1083 else |
1084 DisableTouchHudProjection(); | 1084 DisableTouchHudProjection(); |
1085 } | 1085 } |
1086 | 1086 |
1087 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1087 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
1088 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1088 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
1089 } | 1089 } |
1090 | 1090 |
1091 } // namespace ash | 1091 } // namespace ash |
OLD | NEW |