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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 }; | 166 }; |
167 const int kExtraContainerIdsToMoveInUnifiedMode[] = { | 167 const int kExtraContainerIdsToMoveInUnifiedMode[] = { |
168 kShellWindowId_LockScreenContainer, | 168 kShellWindowId_LockScreenContainer, |
169 kShellWindowId_LockScreenBackgroundContainer, | 169 kShellWindowId_LockScreenBackgroundContainer, |
170 }; | 170 }; |
171 std::vector<int> container_ids( | 171 std::vector<int> container_ids( |
172 kContainerIdsToMove, | 172 kContainerIdsToMove, |
173 kContainerIdsToMove + arraysize(kContainerIdsToMove)); | 173 kContainerIdsToMove + arraysize(kContainerIdsToMove)); |
174 // Check the default_multi_display_mode because this is also necessary | 174 // Check the default_multi_display_mode because this is also necessary |
175 // in trasition between mirror <-> unified mode. | 175 // in trasition between mirror <-> unified mode. |
176 if (Shell::GetInstance()->display_manager()->default_multi_display_mode() == | 176 if (Shell::GetInstance() |
177 DisplayManager::UNIFIED) { | 177 ->display_manager() |
| 178 ->current_default_multi_display_mode() == DisplayManager::UNIFIED) { |
178 for (int id : kExtraContainerIdsToMoveInUnifiedMode) | 179 for (int id : kExtraContainerIdsToMoveInUnifiedMode) |
179 container_ids.push_back(id); | 180 container_ids.push_back(id); |
180 } | 181 } |
181 | 182 |
182 for (int id : container_ids) { | 183 for (int id : container_ids) { |
183 aura::Window* src_container = Shell::GetContainer(src, id); | 184 aura::Window* src_container = Shell::GetContainer(src, id); |
184 aura::Window* dst_container = Shell::GetContainer(dst, id); | 185 aura::Window* dst_container = Shell::GetContainer(dst, id); |
185 while (!src_container->children().empty()) { | 186 while (!src_container->children().empty()) { |
186 // Restart iteration from the source container windows each time as they | 187 // Restart iteration from the source container windows each time as they |
187 // may change as a result of moving other windows. | 188 // may change as a result of moving other windows. |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 else | 1059 else |
1059 DisableTouchHudProjection(); | 1060 DisableTouchHudProjection(); |
1060 } | 1061 } |
1061 | 1062 |
1062 RootWindowController* GetRootWindowController( | 1063 RootWindowController* GetRootWindowController( |
1063 const aura::Window* root_window) { | 1064 const aura::Window* root_window) { |
1064 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1065 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
1065 } | 1066 } |
1066 | 1067 |
1067 } // namespace ash | 1068 } // namespace ash |
OLD | NEW |