| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/desktop_background/desktop_background_widget_controller.h" | 10 #include "ash/desktop_background/desktop_background_widget_controller.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Reparents the appropriate set of windows from |src| to |dst|. | 99 // Reparents the appropriate set of windows from |src| to |dst|. |
| 100 void ReparentAllWindows(aura::RootWindow* src, aura::RootWindow* dst) { | 100 void ReparentAllWindows(aura::RootWindow* src, aura::RootWindow* dst) { |
| 101 // Set of windows to move. | 101 // Set of windows to move. |
| 102 const int kContainerIdsToMove[] = { | 102 const int kContainerIdsToMove[] = { |
| 103 internal::kShellWindowId_DefaultContainer, | 103 internal::kShellWindowId_DefaultContainer, |
| 104 internal::kShellWindowId_AlwaysOnTopContainer, | 104 internal::kShellWindowId_AlwaysOnTopContainer, |
| 105 internal::kShellWindowId_SystemModalContainer, | 105 internal::kShellWindowId_SystemModalContainer, |
| 106 internal::kShellWindowId_LockSystemModalContainer, | 106 internal::kShellWindowId_LockSystemModalContainer, |
| 107 internal::kShellWindowId_InputMethodContainer, | 107 internal::kShellWindowId_InputMethodContainer, |
| 108 }; | 108 }; |
| 109 // For Workspace2 we need to manually reparent the windows. This way | 109 // For workspace windows we need to manually reparent the windows. This way |
| 110 // Workspace2 can move the windows to the appropriate workspace. | 110 // workspace can move the windows to the appropriate workspace. |
| 111 std::vector<aura::Window*> windows(GetWorkspaceWindows(src)); | 111 std::vector<aura::Window*> windows(GetWorkspaceWindows(src)); |
| 112 internal::WorkspaceController* workspace_controller = | 112 internal::WorkspaceController* workspace_controller = |
| 113 GetRootWindowController(dst)->workspace_controller(); | 113 GetRootWindowController(dst)->workspace_controller(); |
| 114 for (size_t i = 0; i < windows.size(); ++i) { | 114 for (size_t i = 0; i < windows.size(); ++i) { |
| 115 aura::Window* new_parent = | 115 aura::Window* new_parent = |
| 116 workspace_controller->GetParentForNewWindow(windows[i]); | 116 workspace_controller->GetParentForNewWindow(windows[i]); |
| 117 ReparentWindow(windows[i], new_parent); | 117 ReparentWindow(windows[i], new_parent); |
| 118 } | 118 } |
| 119 for (size_t i = 0; i < arraysize(kContainerIdsToMove); i++) { | 119 for (size_t i = 0; i < arraysize(kContainerIdsToMove); i++) { |
| 120 int id = kContainerIdsToMove[i]; | 120 int id = kContainerIdsToMove[i]; |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 "OverlayContainer", | 615 "OverlayContainer", |
| 616 lock_screen_related_containers); | 616 lock_screen_related_containers); |
| 617 SetUsesScreenCoordinates(overlay_container); | 617 SetUsesScreenCoordinates(overlay_container); |
| 618 | 618 |
| 619 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, | 619 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, |
| 620 "PowerButtonAnimationContainer", root_window) ; | 620 "PowerButtonAnimationContainer", root_window) ; |
| 621 } | 621 } |
| 622 | 622 |
| 623 } // namespace internal | 623 } // namespace internal |
| 624 } // namespace ash | 624 } // namespace ash |
| OLD | NEW |