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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 // Reparents the appropriate set of windows from |src| to |dst|. | 155 // Reparents the appropriate set of windows from |src| to |dst|. |
156 void ReparentAllWindows(aura::Window* src, aura::Window* dst) { | 156 void ReparentAllWindows(aura::Window* src, aura::Window* dst) { |
157 // Set of windows to move. | 157 // Set of windows to move. |
158 const int kContainerIdsToMove[] = { | 158 const int kContainerIdsToMove[] = { |
159 kShellWindowId_DefaultContainer, | 159 kShellWindowId_DefaultContainer, |
160 kShellWindowId_DockedContainer, | 160 kShellWindowId_DockedContainer, |
161 kShellWindowId_PanelContainer, | 161 kShellWindowId_PanelContainer, |
162 kShellWindowId_AlwaysOnTopContainer, | 162 kShellWindowId_AlwaysOnTopContainer, |
163 kShellWindowId_SystemModalContainer, | 163 kShellWindowId_SystemModalContainer, |
164 kShellWindowId_LockSystemModalContainer, | 164 kShellWindowId_LockSystemModalContainer, |
165 kShellWindowId_UnparentedControlContainer, }; | 165 kShellWindowId_UnparentedControlContainer, |
166 kShellWindowId_OverlayContainer, }; | |
Jun Mukai
2014/12/05 02:23:08
Oops, I've missed this, but does this work well wi
Tim Song
2014/12/05 19:29:51
I tested this manually, and there doesn't seem to
| |
166 for (size_t i = 0; i < arraysize(kContainerIdsToMove); i++) { | 167 for (size_t i = 0; i < arraysize(kContainerIdsToMove); i++) { |
167 int id = kContainerIdsToMove[i]; | 168 int id = kContainerIdsToMove[i]; |
168 aura::Window* src_container = Shell::GetContainer(src, id); | 169 aura::Window* src_container = Shell::GetContainer(src, id); |
169 aura::Window* dst_container = Shell::GetContainer(dst, id); | 170 aura::Window* dst_container = Shell::GetContainer(dst, id); |
170 while (!src_container->children().empty()) { | 171 while (!src_container->children().empty()) { |
171 // Restart iteration from the source container windows each time as they | 172 // Restart iteration from the source container windows each time as they |
172 // may change as a result of moving other windows. | 173 // may change as a result of moving other windows. |
173 aura::Window::Windows::const_iterator iter = | 174 aura::Window::Windows::const_iterator iter = |
174 src_container->children().begin(); | 175 src_container->children().begin(); |
175 while (iter != src_container->children().end() && | 176 while (iter != src_container->children().end() && |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1051 else | 1052 else |
1052 DisableTouchHudProjection(); | 1053 DisableTouchHudProjection(); |
1053 } | 1054 } |
1054 | 1055 |
1055 RootWindowController* GetRootWindowController( | 1056 RootWindowController* GetRootWindowController( |
1056 const aura::Window* root_window) { | 1057 const aura::Window* root_window) { |
1057 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1058 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
1058 } | 1059 } |
1059 | 1060 |
1060 } // namespace ash | 1061 } // namespace ash |
OLD | NEW |