| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/mus/test/wm_test_helper.h" | 5 #include "ash/mus/test/wm_test_helper.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/test/material_design_controller_test_api.h" | 8 #include "ash/common/test/material_design_controller_test_api.h" |
| 9 #include "ash/common/test/test_new_window_client.h" | |
| 10 #include "ash/common/test/test_system_tray_delegate.h" | 9 #include "ash/common/test/test_system_tray_delegate.h" |
| 11 #include "ash/common/test/wm_shell_test_api.h" | 10 #include "ash/common/test/wm_shell_test_api.h" |
| 12 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
| 13 #include "ash/mus/root_window_controller.h" | 12 #include "ash/mus/root_window_controller.h" |
| 14 #include "ash/mus/screen_mus.h" | 13 #include "ash/mus/screen_mus.h" |
| 15 #include "ash/mus/window_manager.h" | 14 #include "ash/mus/window_manager.h" |
| 16 #include "ash/mus/window_manager_application.h" | 15 #include "ash/mus/window_manager_application.h" |
| 17 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
| 18 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
| 19 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 aura::test::EnvTestHelper().SetWindowTreeClient( | 108 aura::test::EnvTestHelper().SetWindowTreeClient( |
| 110 window_tree_client_setup_.window_tree_client()); | 109 window_tree_client_setup_.window_tree_client()); |
| 111 window_manager_app_->InitWindowManager( | 110 window_manager_app_->InitWindowManager( |
| 112 window_tree_client_setup_.OwnWindowTreeClient(), | 111 window_tree_client_setup_.OwnWindowTreeClient(), |
| 113 blocking_pool_owner_->pool()); | 112 blocking_pool_owner_->pool()); |
| 114 | 113 |
| 115 // TODO(jamescook): Pass a TestShellDelegate into WindowManager and use it to | 114 // TODO(jamescook): Pass a TestShellDelegate into WindowManager and use it to |
| 116 // create the various test delegates. | 115 // create the various test delegates. |
| 117 WmShellTestApi().SetSystemTrayDelegate( | 116 WmShellTestApi().SetSystemTrayDelegate( |
| 118 base::MakeUnique<test::TestSystemTrayDelegate>()); | 117 base::MakeUnique<test::TestSystemTrayDelegate>()); |
| 119 WmShellTestApi().SetNewWindowClient(base::MakeUnique<TestNewWindowClient>()); | |
| 120 | 118 |
| 121 aura::WindowTreeClient* window_tree_client = | 119 aura::WindowTreeClient* window_tree_client = |
| 122 window_manager_app_->window_manager()->window_tree_client(); | 120 window_manager_app_->window_manager()->window_tree_client(); |
| 123 window_tree_client_private_ = | 121 window_tree_client_private_ = |
| 124 base::MakeUnique<aura::WindowTreeClientPrivate>(window_tree_client); | 122 base::MakeUnique<aura::WindowTreeClientPrivate>(window_tree_client); |
| 125 int next_x = 0; | 123 int next_x = 0; |
| 126 CreateRootWindowController("800x600", &next_x); | 124 CreateRootWindowController("800x600", &next_x); |
| 127 } | 125 } |
| 128 | 126 |
| 129 std::vector<RootWindowController*> WmTestHelper::GetRootsOrderedByDisplayId() { | 127 std::vector<RootWindowController*> WmTestHelper::GetRootsOrderedByDisplayId() { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 root_window_controller->display().id()) == | 187 root_window_controller->display().id()) == |
| 190 screen->display_list().GetPrimaryDisplayIterator(); | 188 screen->display_list().GetPrimaryDisplayIterator(); |
| 191 screen->display_list().UpdateDisplay( | 189 screen->display_list().UpdateDisplay( |
| 192 root_window_controller->display(), | 190 root_window_controller->display(), |
| 193 is_primary ? display::DisplayList::Type::PRIMARY | 191 is_primary ? display::DisplayList::Type::PRIMARY |
| 194 : display::DisplayList::Type::NOT_PRIMARY); | 192 : display::DisplayList::Type::NOT_PRIMARY); |
| 195 } | 193 } |
| 196 | 194 |
| 197 } // namespace mus | 195 } // namespace mus |
| 198 } // namespace ash | 196 } // namespace ash |
| OLD | NEW |