OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/ash_test_helper.h" | 5 #include "ash/test/ash_test_helper.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" | 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
8 #include "ash/aura/wm_shell_aura.h" | 8 #include "ash/aura/wm_shell_aura.h" |
9 #include "ash/common/test/test_session_state_delegate.h" | 9 #include "ash/common/test/test_session_state_delegate.h" |
10 #include "ash/common/test/test_system_tray_delegate.h" | 10 #include "ash/common/test/test_system_tray_delegate.h" |
11 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
12 #include "ash/common/wm_window.h" | 12 #include "ash/common/wm_window.h" |
| 13 #include "ash/mus/bridge/wm_shell_mus.h" |
13 #include "ash/mus/screen_mus.h" | 14 #include "ash/mus/screen_mus.h" |
14 #include "ash/mus/window_manager.h" | 15 #include "ash/mus/window_manager.h" |
15 #include "ash/mus/window_manager_application.h" | 16 #include "ash/mus/window_manager_application.h" |
16 #include "ash/public/cpp/config.h" | 17 #include "ash/public/cpp/config.h" |
17 #include "ash/shell.h" | 18 #include "ash/shell.h" |
18 #include "ash/shell_init_params.h" | 19 #include "ash/shell_init_params.h" |
19 #include "ash/system/chromeos/screen_layout_observer.h" | 20 #include "ash/system/chromeos/screen_layout_observer.h" |
20 #include "ash/test/ash_test_environment.h" | 21 #include "ash/test/ash_test_environment.h" |
21 #include "ash/test/ash_test_views_delegate.h" | 22 #include "ash/test/ash_test_views_delegate.h" |
22 #include "ash/test/display_configuration_controller_test_api.h" | 23 #include "ash/test/display_configuration_controller_test_api.h" |
(...skipping 27 matching lines...) Expand all Loading... |
50 #include "ui/wm/core/capture_controller.h" | 51 #include "ui/wm/core/capture_controller.h" |
51 #include "ui/wm/core/cursor_manager.h" | 52 #include "ui/wm/core/cursor_manager.h" |
52 #include "ui/wm/core/wm_state.h" | 53 #include "ui/wm/core/wm_state.h" |
53 | 54 |
54 using display::ManagedDisplayInfo; | 55 using display::ManagedDisplayInfo; |
55 | 56 |
56 namespace ash { | 57 namespace ash { |
57 namespace test { | 58 namespace test { |
58 namespace { | 59 namespace { |
59 | 60 |
60 bool IsMash() { | |
61 // TODO(sky): this won't work correctly for detecting mus vs mash. | |
62 return aura::Env::GetInstance()->mode() == aura::Env::Mode::MUS; | |
63 } | |
64 | |
65 bool CompareByDisplayId(RootWindowController* root1, | 61 bool CompareByDisplayId(RootWindowController* root1, |
66 RootWindowController* root2) { | 62 RootWindowController* root2) { |
67 return root1->GetWindow()->GetDisplayNearestWindow().id() < | 63 return root1->GetWindow()->GetDisplayNearestWindow().id() < |
68 root2->GetWindow()->GetDisplayNearestWindow().id(); | 64 root2->GetWindow()->GetDisplayNearestWindow().id(); |
69 } | 65 } |
70 | 66 |
71 } // namespace | 67 } // namespace |
72 | 68 |
| 69 // static |
| 70 Config AshTestHelper::config_ = Config::CLASSIC; |
| 71 |
73 AshTestHelper::AshTestHelper(AshTestEnvironment* ash_test_environment) | 72 AshTestHelper::AshTestHelper(AshTestEnvironment* ash_test_environment) |
74 : ash_test_environment_(ash_test_environment), | 73 : ash_test_environment_(ash_test_environment), |
75 test_shell_delegate_(nullptr), | 74 test_shell_delegate_(nullptr), |
76 test_screenshot_delegate_(nullptr), | 75 test_screenshot_delegate_(nullptr), |
77 dbus_thread_manager_initialized_(false), | 76 dbus_thread_manager_initialized_(false), |
78 bluez_dbus_manager_initialized_(false) { | 77 bluez_dbus_manager_initialized_(false) { |
79 ui::test::EnableTestConfigForPlatformWindows(); | 78 ui::test::EnableTestConfigForPlatformWindows(); |
80 aura::test::InitializeAuraEventGeneratorDelegate(); | 79 aura::test::InitializeAuraEventGeneratorDelegate(); |
81 } | 80 } |
82 | 81 |
83 AshTestHelper::~AshTestHelper() {} | 82 AshTestHelper::~AshTestHelper() {} |
84 | 83 |
85 void AshTestHelper::SetUp(bool start_session) { | 84 void AshTestHelper::SetUp(bool start_session) { |
86 display::ResetDisplayIdForTest(); | 85 display::ResetDisplayIdForTest(); |
87 const bool is_mash = IsMash(); | 86 if (config_ != Config::CLASSIC) |
88 if (is_mash) | |
89 aura::test::EnvTestHelper().SetAlwaysUseLastMouseLocation(true); | 87 aura::test::EnvTestHelper().SetAlwaysUseLastMouseLocation(true); |
90 // WindowManager creates WMState for mash. | 88 // WindowManager creates WMState for mash. |
91 if (!is_mash) | 89 if (config_ == Config::CLASSIC) |
92 wm_state_ = base::MakeUnique<::wm::WMState>(); | 90 wm_state_ = base::MakeUnique<::wm::WMState>(); |
93 views_delegate_ = ash_test_environment_->CreateViewsDelegate(); | 91 views_delegate_ = ash_test_environment_->CreateViewsDelegate(); |
94 | 92 |
95 // Disable animations during tests. | 93 // Disable animations during tests. |
96 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( | 94 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( |
97 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); | 95 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); |
98 ui::InitializeInputMethodForTesting(); | 96 ui::InitializeInputMethodForTesting(); |
99 | 97 |
100 // Creates Shell and hook with Desktop. | 98 // Creates Shell and hook with Desktop. |
101 if (!test_shell_delegate_) | 99 if (!test_shell_delegate_) |
102 test_shell_delegate_ = new TestShellDelegate; | 100 test_shell_delegate_ = new TestShellDelegate; |
103 | 101 |
104 if (!is_mash) { | 102 if (config_ == Config::CLASSIC) { |
105 // All of this initialization is done in WindowManagerApplication for mash. | 103 // All of this initialization is done in WindowManagerApplication for mash. |
106 | 104 |
107 // Creates MessageCenter since g_browser_process is not created in | 105 // Creates MessageCenter since g_browser_process is not created in |
108 // AshTestBase tests. | 106 // AshTestBase tests. |
109 message_center::MessageCenter::Initialize(); | 107 message_center::MessageCenter::Initialize(); |
110 | 108 |
111 if (!chromeos::DBusThreadManager::IsInitialized()) { | 109 if (!chromeos::DBusThreadManager::IsInitialized()) { |
112 chromeos::DBusThreadManager::Initialize( | 110 chromeos::DBusThreadManager::Initialize( |
113 chromeos::DBusThreadManager::PROCESS_ASH); | 111 chromeos::DBusThreadManager::PROCESS_ASH); |
114 dbus_thread_manager_initialized_ = true; | 112 dbus_thread_manager_initialized_ = true; |
(...skipping 14 matching lines...) Expand all Loading... |
129 ash_test_environment_->SetUp(); | 127 ash_test_environment_->SetUp(); |
130 // Reset the global state for the cursor manager. This includes the | 128 // Reset the global state for the cursor manager. This includes the |
131 // last cursor visibility state, etc. | 129 // last cursor visibility state, etc. |
132 ::wm::CursorManager::ResetCursorVisibilityStateForTest(); | 130 ::wm::CursorManager::ResetCursorVisibilityStateForTest(); |
133 | 131 |
134 // ContentTestSuiteBase might have already initialized | 132 // ContentTestSuiteBase might have already initialized |
135 // MaterialDesignController in unit_tests suite. | 133 // MaterialDesignController in unit_tests suite. |
136 ui::test::MaterialDesignControllerTestAPI::Uninitialize(); | 134 ui::test::MaterialDesignControllerTestAPI::Uninitialize(); |
137 ui::MaterialDesignController::Initialize(); | 135 ui::MaterialDesignController::Initialize(); |
138 | 136 |
139 if (is_mash) | 137 if (config_ != Config::CLASSIC) |
140 CreateMashWindowManager(); | 138 CreateMashWindowManager(); |
141 else | 139 else |
142 CreateShell(); | 140 CreateShell(); |
143 | 141 |
144 aura::test::EnvTestHelper().SetInputStateLookup( | 142 aura::test::EnvTestHelper().SetInputStateLookup( |
145 std::unique_ptr<aura::InputStateLookup>()); | 143 std::unique_ptr<aura::InputStateLookup>()); |
146 | 144 |
147 session_controller_client_.reset( | 145 session_controller_client_.reset( |
148 new TestSessionControllerClient(Shell::Get()->session_controller())); | 146 new TestSessionControllerClient(Shell::Get()->session_controller())); |
149 session_controller_client_->InitializeAndBind(); | 147 session_controller_client_->InitializeAndBind(); |
150 | 148 |
151 Shell* shell = Shell::GetInstance(); | 149 Shell* shell = Shell::GetInstance(); |
152 if (start_session) | 150 if (start_session) |
153 session_controller_client_->CreatePredefinedUserSessions(1); | 151 session_controller_client_->CreatePredefinedUserSessions(1); |
154 | 152 |
155 if (!is_mash) { | 153 if (config_ == Config::CLASSIC) { |
156 // ScreenLayoutObserver is specific to classic-ash. | 154 // ScreenLayoutObserver is specific to classic-ash. |
157 // Tests that change the display configuration generally don't care about | 155 // Tests that change the display configuration generally don't care about |
158 // the notifications and the popup UI can interfere with things like | 156 // the notifications and the popup UI can interfere with things like |
159 // cursors. | 157 // cursors. |
160 shell->screen_layout_observer()->set_show_notifications_for_testing(false); | 158 shell->screen_layout_observer()->set_show_notifications_for_testing(false); |
161 | 159 |
162 // DisplayManager is specific to classic-ash. | 160 // DisplayManager is specific to classic-ash. |
163 display::test::DisplayManagerTestApi( | 161 display::test::DisplayManagerTestApi( |
164 Shell::GetInstance()->display_manager()) | 162 Shell::GetInstance()->display_manager()) |
165 .DisableChangeDisplayUponHostResize(); | 163 .DisableChangeDisplayUponHostResize(); |
166 DisplayConfigurationControllerTestApi( | 164 DisplayConfigurationControllerTestApi( |
167 shell->display_configuration_controller()) | 165 shell->display_configuration_controller()) |
168 .DisableDisplayAnimator(); | 166 .DisableDisplayAnimator(); |
169 | 167 |
170 // TODO: disabled for mash as AcceleratorControllerDelegateAura isn't | 168 // TODO: disabled for mash as AcceleratorControllerDelegateAura isn't |
171 // created in mash http://crbug.com/632111. | 169 // created in mash http://crbug.com/632111. |
172 test_screenshot_delegate_ = new TestScreenshotDelegate(); | 170 test_screenshot_delegate_ = new TestScreenshotDelegate(); |
173 WmShellAura::Get() | 171 WmShellAura::Get() |
174 ->accelerator_controller_delegate() | 172 ->accelerator_controller_delegate() |
175 ->SetScreenshotDelegate( | 173 ->SetScreenshotDelegate( |
176 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); | 174 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); |
| 175 } else if (config_ == Config::MUS) { |
| 176 test_screenshot_delegate_ = new TestScreenshotDelegate(); |
| 177 mus::WmShellMus::Get() |
| 178 ->accelerator_controller_delegate_mus() |
| 179 ->SetScreenshotDelegate( |
| 180 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); |
177 } | 181 } |
178 } | 182 } |
179 | 183 |
180 void AshTestHelper::TearDown() { | 184 void AshTestHelper::TearDown() { |
181 window_manager_app_.reset(); | 185 window_manager_app_.reset(); |
182 | 186 |
183 const bool is_mash = IsMash(); | |
184 | |
185 // WindowManger owns the Shell in mash. | 187 // WindowManger owns the Shell in mash. |
186 if (!is_mash) | 188 if (config_ == Config::CLASSIC) |
187 Shell::DeleteInstance(); | 189 Shell::DeleteInstance(); |
188 | 190 |
189 // Suspend the tear down until all resources are returned via | 191 // Suspend the tear down until all resources are returned via |
190 // MojoCompositorFrameSinkClient::ReclaimResources() | 192 // MojoCompositorFrameSinkClient::ReclaimResources() |
191 RunAllPendingInMessageLoop(); | 193 RunAllPendingInMessageLoop(); |
192 ash_test_environment_->TearDown(); | 194 ash_test_environment_->TearDown(); |
193 | 195 |
194 test_screenshot_delegate_ = NULL; | 196 test_screenshot_delegate_ = NULL; |
195 | 197 |
196 if (!is_mash) { | 198 if (config_ == Config::CLASSIC) { |
197 // Remove global message center state. | 199 // Remove global message center state. |
198 message_center::MessageCenter::Shutdown(); | 200 message_center::MessageCenter::Shutdown(); |
199 | 201 |
200 chromeos::CrasAudioHandler::Shutdown(); | 202 chromeos::CrasAudioHandler::Shutdown(); |
201 } | 203 } |
202 | 204 |
203 if (bluez_dbus_manager_initialized_) { | 205 if (bluez_dbus_manager_initialized_) { |
204 device::BluetoothAdapterFactory::Shutdown(); | 206 device::BluetoothAdapterFactory::Shutdown(); |
205 bluez::BluezDBusManager::Shutdown(); | 207 bluez::BluezDBusManager::Shutdown(); |
206 bluez_dbus_manager_initialized_ = false; | 208 bluez_dbus_manager_initialized_ = false; |
207 } | 209 } |
208 | 210 |
209 if (dbus_thread_manager_initialized_) { | 211 if (dbus_thread_manager_initialized_) { |
210 chromeos::DBusThreadManager::Shutdown(); | 212 chromeos::DBusThreadManager::Shutdown(); |
211 dbus_thread_manager_initialized_ = false; | 213 dbus_thread_manager_initialized_ = false; |
212 } | 214 } |
213 | 215 |
214 ui::TerminateContextFactoryForTests(); | 216 ui::TerminateContextFactoryForTests(); |
215 | 217 |
216 ui::ShutdownInputMethodForTesting(); | 218 ui::ShutdownInputMethodForTesting(); |
217 zero_duration_mode_.reset(); | 219 zero_duration_mode_.reset(); |
218 | 220 |
219 views_delegate_.reset(); | 221 views_delegate_.reset(); |
220 wm_state_.reset(); | 222 wm_state_.reset(); |
221 | 223 |
222 // WindowManager owns the CaptureController for mash. | 224 // WindowManager owns the CaptureController for mus/mash. |
223 CHECK(is_mash || !::wm::CaptureController::Get()); | 225 CHECK(config_ != Config::CLASSIC || !::wm::CaptureController::Get()); |
224 } | 226 } |
225 | 227 |
226 void AshTestHelper::RunAllPendingInMessageLoop() { | 228 void AshTestHelper::RunAllPendingInMessageLoop() { |
227 base::RunLoop run_loop; | 229 base::RunLoop run_loop; |
228 run_loop.RunUntilIdle(); | 230 run_loop.RunUntilIdle(); |
229 } | 231 } |
230 | 232 |
231 // static | 233 // static |
232 TestSessionStateDelegate* AshTestHelper::GetTestSessionStateDelegate() { | 234 TestSessionStateDelegate* AshTestHelper::GetTestSessionStateDelegate() { |
233 CHECK(WmShell::HasInstance()); | 235 CHECK(WmShell::HasInstance()); |
(...skipping 10 matching lines...) Expand all Loading... |
244 } | 246 } |
245 | 247 |
246 void AshTestHelper::UpdateDisplayForMash(const std::string& display_spec) { | 248 void AshTestHelper::UpdateDisplayForMash(const std::string& display_spec) { |
247 // TODO(erg): This is not equivalent to display::DisplayManager:: | 249 // TODO(erg): This is not equivalent to display::DisplayManager:: |
248 // UpdateDisplaysWith(). This does not calculate all the internal metric | 250 // UpdateDisplaysWith(). This does not calculate all the internal metric |
249 // changes, does not calculate focus changes and does not dispatch to all the | 251 // changes, does not calculate focus changes and does not dispatch to all the |
250 // observers in ash which want to be notified about the previous two. | 252 // observers in ash which want to be notified about the previous two. |
251 // | 253 // |
252 // Once this is fixed, RootWindowControllerTest.MoveWindows_Basic, among | 254 // Once this is fixed, RootWindowControllerTest.MoveWindows_Basic, among |
253 // other unit tests, should work. http://crbug.com/695632. | 255 // other unit tests, should work. http://crbug.com/695632. |
254 CHECK(IsMash()); | 256 CHECK(config_ != Config::CLASSIC); |
255 const std::vector<std::string> parts = base::SplitString( | 257 const std::vector<std::string> parts = base::SplitString( |
256 display_spec, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 258 display_spec, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
257 std::vector<RootWindowController*> root_window_controllers = | 259 std::vector<RootWindowController*> root_window_controllers = |
258 GetRootsOrderedByDisplayId(); | 260 GetRootsOrderedByDisplayId(); |
259 int next_x = 0; | 261 int next_x = 0; |
260 for (size_t i = 0, | 262 for (size_t i = 0, |
261 end = std::min(parts.size(), root_window_controllers.size()); | 263 end = std::min(parts.size(), root_window_controllers.size()); |
262 i < end; ++i) { | 264 i < end; ++i) { |
263 UpdateDisplay(root_window_controllers[i], parts[i], &next_x); | 265 UpdateDisplay(root_window_controllers[i], parts[i], &next_x); |
264 } | 266 } |
265 for (size_t i = root_window_controllers.size(); i < parts.size(); ++i) { | 267 for (size_t i = root_window_controllers.size(); i < parts.size(); ++i) { |
266 root_window_controllers.push_back( | 268 root_window_controllers.push_back( |
267 CreateRootWindowController(parts[i], &next_x)); | 269 CreateRootWindowController(parts[i], &next_x)); |
268 } | 270 } |
269 const bool in_shutdown = false; | 271 const bool in_shutdown = false; |
270 while (root_window_controllers.size() > parts.size()) { | 272 while (root_window_controllers.size() > parts.size()) { |
271 window_manager_app_->window_manager()->DestroyRootWindowController( | 273 window_manager_app_->window_manager()->DestroyRootWindowController( |
272 root_window_controllers.back(), in_shutdown); | 274 root_window_controllers.back(), in_shutdown); |
273 root_window_controllers.pop_back(); | 275 root_window_controllers.pop_back(); |
274 } | 276 } |
275 } | 277 } |
276 | 278 |
277 display::Display AshTestHelper::GetSecondaryDisplay() { | 279 display::Display AshTestHelper::GetSecondaryDisplay() { |
278 if (!IsMash()) | 280 if (config_ == Config::CLASSIC) |
279 return Shell::GetInstance()->display_manager()->GetSecondaryDisplay(); | 281 return Shell::GetInstance()->display_manager()->GetSecondaryDisplay(); |
280 | 282 |
281 std::vector<RootWindowController*> roots = GetRootsOrderedByDisplayId(); | 283 std::vector<RootWindowController*> roots = GetRootsOrderedByDisplayId(); |
282 CHECK_LE(2U, roots.size()); | 284 CHECK_LE(2U, roots.size()); |
283 return roots.size() < 2 ? display::Display() | 285 return roots.size() < 2 ? display::Display() |
284 : roots[1]->GetWindow()->GetDisplayNearestWindow(); | 286 : roots[1]->GetWindow()->GetDisplayNearestWindow(); |
285 } | 287 } |
286 | 288 |
287 void AshTestHelper::CreateMashWindowManager() { | 289 void AshTestHelper::CreateMashWindowManager() { |
288 CHECK(IsMash()); | 290 CHECK(config_ != Config::CLASSIC); |
289 window_manager_app_ = base::MakeUnique<mus::WindowManagerApplication>(); | 291 window_manager_app_ = base::MakeUnique<mus::WindowManagerApplication>(); |
290 | 292 |
291 window_manager_app_->window_manager_.reset( | 293 window_manager_app_->window_manager_.reset( |
292 new mus::WindowManager(nullptr, Config::MASH)); | 294 new mus::WindowManager(nullptr, config_)); |
293 window_manager_app_->window_manager()->shell_delegate_.reset( | 295 window_manager_app_->window_manager()->shell_delegate_.reset( |
294 test_shell_delegate_); | 296 test_shell_delegate_); |
295 window_manager_app_->window_manager() | 297 window_manager_app_->window_manager() |
296 ->create_session_state_delegate_stub_for_test_ = false; | 298 ->create_session_state_delegate_stub_for_test_ = false; |
297 | 299 |
298 window_tree_client_setup_.InitForWindowManager( | 300 window_tree_client_setup_.InitForWindowManager( |
299 window_manager_app_->window_manager_.get(), | 301 window_manager_app_->window_manager_.get(), |
300 window_manager_app_->window_manager_.get()); | 302 window_manager_app_->window_manager_.get()); |
301 aura::test::EnvTestHelper().SetWindowTreeClient( | 303 aura::test::EnvTestHelper().SetWindowTreeClient( |
302 window_tree_client_setup_.window_tree_client()); | 304 window_tree_client_setup_.window_tree_client()); |
(...skipping 11 matching lines...) Expand all Loading... |
314 base::MakeUnique<aura::WindowTreeClientPrivate>(window_tree_client); | 316 base::MakeUnique<aura::WindowTreeClientPrivate>(window_tree_client); |
315 int next_x = 0; | 317 int next_x = 0; |
316 CreateRootWindowController("800x600", &next_x); | 318 CreateRootWindowController("800x600", &next_x); |
317 | 319 |
318 // Make sure the NetworkHandler didn't get turned on, see above comment as to | 320 // Make sure the NetworkHandler didn't get turned on, see above comment as to |
319 // why the NetworkHandler should not be running. | 321 // why the NetworkHandler should not be running. |
320 CHECK(!chromeos::NetworkHandler::IsInitialized()); | 322 CHECK(!chromeos::NetworkHandler::IsInitialized()); |
321 } | 323 } |
322 | 324 |
323 void AshTestHelper::CreateShell() { | 325 void AshTestHelper::CreateShell() { |
324 CHECK(!IsMash()); | 326 CHECK(config_ == Config::CLASSIC); |
325 ui::ContextFactory* context_factory = nullptr; | 327 ui::ContextFactory* context_factory = nullptr; |
326 ui::ContextFactoryPrivate* context_factory_private = nullptr; | 328 ui::ContextFactoryPrivate* context_factory_private = nullptr; |
327 bool enable_pixel_output = false; | 329 bool enable_pixel_output = false; |
328 ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, | 330 ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, |
329 &context_factory_private); | 331 &context_factory_private); |
330 ShellInitParams init_params; | 332 ShellInitParams init_params; |
331 init_params.delegate = test_shell_delegate_; | 333 init_params.delegate = test_shell_delegate_; |
332 init_params.context_factory = context_factory; | 334 init_params.context_factory = context_factory; |
333 init_params.context_factory_private = context_factory_private; | 335 init_params.context_factory_private = context_factory_private; |
334 init_params.blocking_pool = ash_test_environment_->GetBlockingPool(); | 336 init_params.blocking_pool = ash_test_environment_->GetBlockingPool(); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 std::set<RootWindowController*> roots = | 377 std::set<RootWindowController*> roots = |
376 window_manager_app_->window_manager()->GetRootWindowControllers(); | 378 window_manager_app_->window_manager()->GetRootWindowControllers(); |
377 std::vector<RootWindowController*> ordered_roots; | 379 std::vector<RootWindowController*> ordered_roots; |
378 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); | 380 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); |
379 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); | 381 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); |
380 return ordered_roots; | 382 return ordered_roots; |
381 } | 383 } |
382 | 384 |
383 } // namespace test | 385 } // namespace test |
384 } // namespace ash | 386 } // namespace ash |
OLD | NEW |