| 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 <queue> | 7 #include <queue> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "ash/shell_factory.h" | 26 #include "ash/shell_factory.h" |
| 27 #include "ash/shell_window_ids.h" | 27 #include "ash/shell_window_ids.h" |
| 28 #include "ash/switchable_windows.h" | 28 #include "ash/switchable_windows.h" |
| 29 #include "ash/system/status_area_widget.h" | 29 #include "ash/system/status_area_widget.h" |
| 30 #include "ash/system/tray/system_tray_delegate.h" | 30 #include "ash/system/tray/system_tray_delegate.h" |
| 31 #include "ash/system/tray/system_tray_notifier.h" | 31 #include "ash/system/tray/system_tray_notifier.h" |
| 32 #include "ash/touch/touch_hud_debug.h" | 32 #include "ash/touch/touch_hud_debug.h" |
| 33 #include "ash/touch/touch_hud_projection.h" | 33 #include "ash/touch/touch_hud_projection.h" |
| 34 #include "ash/touch/touch_observer_hud.h" | 34 #include "ash/touch/touch_observer_hud.h" |
| 35 #include "ash/wm/always_on_top_controller.h" | 35 #include "ash/wm/always_on_top_controller.h" |
| 36 #include "ash/wm/aura/wm_window_aura.h" |
| 36 #include "ash/wm/common/workspace/workspace_layout_manager_delegate.h" | 37 #include "ash/wm/common/workspace/workspace_layout_manager_delegate.h" |
| 37 #include "ash/wm/dock/docked_window_layout_manager.h" | 38 #include "ash/wm/dock/docked_window_layout_manager.h" |
| 38 #include "ash/wm/lock_layout_manager.h" | 39 #include "ash/wm/lock_layout_manager.h" |
| 39 #include "ash/wm/panels/attached_panel_window_targeter.h" | 40 #include "ash/wm/panels/attached_panel_window_targeter.h" |
| 40 #include "ash/wm/panels/panel_layout_manager.h" | 41 #include "ash/wm/panels/panel_layout_manager.h" |
| 41 #include "ash/wm/panels/panel_window_event_handler.h" | 42 #include "ash/wm/panels/panel_window_event_handler.h" |
| 42 #include "ash/wm/root_window_layout_manager.h" | 43 #include "ash/wm/root_window_layout_manager.h" |
| 43 #include "ash/wm/stacking_controller.h" | 44 #include "ash/wm/stacking_controller.h" |
| 44 #include "ash/wm/status_area_layout_manager.h" | 45 #include "ash/wm/status_area_layout_manager.h" |
| 45 #include "ash/wm/system_background_controller.h" | 46 #include "ash/wm/system_background_controller.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 const gfx::Size dst_size = new_parent->bounds().size(); | 128 const gfx::Size dst_size = new_parent->bounds().size(); |
| 128 // Update the restore bounds to make it relative to the display. | 129 // Update the restore bounds to make it relative to the display. |
| 129 wm::WindowState* state = wm::GetWindowState(window); | 130 wm::WindowState* state = wm::GetWindowState(window); |
| 130 gfx::Rect restore_bounds; | 131 gfx::Rect restore_bounds; |
| 131 bool has_restore_bounds = state->HasRestoreBounds(); | 132 bool has_restore_bounds = state->HasRestoreBounds(); |
| 132 | 133 |
| 133 bool update_bounds = (state->IsNormalOrSnapped() || state->IsMinimized()) && | 134 bool update_bounds = (state->IsNormalOrSnapped() || state->IsMinimized()) && |
| 134 new_parent->id() != kShellWindowId_DockedContainer; | 135 new_parent->id() != kShellWindowId_DockedContainer; |
| 135 gfx::Rect local_bounds; | 136 gfx::Rect local_bounds; |
| 136 if (update_bounds) { | 137 if (update_bounds) { |
| 137 local_bounds = state->aura_window()->bounds(); | 138 local_bounds = wm::WmWindowAura::GetAuraWindow(state->window())->bounds(); |
| 138 MoveOriginRelativeToSize(src_size, dst_size, &local_bounds); | 139 MoveOriginRelativeToSize(src_size, dst_size, &local_bounds); |
| 139 } | 140 } |
| 140 | 141 |
| 141 if (has_restore_bounds) { | 142 if (has_restore_bounds) { |
| 142 restore_bounds = state->GetRestoreBoundsInParent(); | 143 restore_bounds = state->GetRestoreBoundsInParent(); |
| 143 MoveOriginRelativeToSize(src_size, dst_size, &restore_bounds); | 144 MoveOriginRelativeToSize(src_size, dst_size, &restore_bounds); |
| 144 } | 145 } |
| 145 | 146 |
| 146 new_parent->AddChild(window); | 147 new_parent->AddChild(window); |
| 147 | 148 |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 else | 1084 else |
| 1084 DisableTouchHudProjection(); | 1085 DisableTouchHudProjection(); |
| 1085 } | 1086 } |
| 1086 | 1087 |
| 1087 RootWindowController* GetRootWindowController( | 1088 RootWindowController* GetRootWindowController( |
| 1088 const aura::Window* root_window) { | 1089 const aura::Window* root_window) { |
| 1089 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1090 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
| 1090 } | 1091 } |
| 1091 | 1092 |
| 1092 } // namespace ash | 1093 } // namespace ash |
| OLD | NEW |