| 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_system_tray_delegate.h" |
| 10 #include "ash/common/test/wm_shell_test_api.h" |
| 11 #include "ash/common/wm_shell.h" |
| 9 #include "ash/mus/root_window_controller.h" | 12 #include "ash/mus/root_window_controller.h" |
| 10 #include "ash/mus/window_manager.h" | 13 #include "ash/mus/window_manager.h" |
| 11 #include "ash/mus/window_manager_application.h" | 14 #include "ash/mus/window_manager_application.h" |
| 12 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
| 13 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
| 14 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/string_split.h" | 18 #include "base/strings/string_split.h" |
| 16 #include "base/test/sequenced_worker_pool_owner.h" | 19 #include "base/test/sequenced_worker_pool_owner.h" |
| 17 #include "services/ui/public/cpp/property_type_converters.h" | 20 #include "services/ui/public/cpp/property_type_converters.h" |
| 18 #include "services/ui/public/cpp/tests/window_tree_client_private.h" | 21 #include "services/ui/public/cpp/tests/window_tree_client_private.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 99 |
| 97 window_manager_app_->window_manager_.reset(new WindowManager(nullptr)); | 100 window_manager_app_->window_manager_.reset(new WindowManager(nullptr)); |
| 98 | 101 |
| 99 window_tree_client_setup_.InitForWindowManager( | 102 window_tree_client_setup_.InitForWindowManager( |
| 100 window_manager_app_->window_manager_.get(), | 103 window_manager_app_->window_manager_.get(), |
| 101 window_manager_app_->window_manager_.get()); | 104 window_manager_app_->window_manager_.get()); |
| 102 window_manager_app_->InitWindowManager( | 105 window_manager_app_->InitWindowManager( |
| 103 window_tree_client_setup_.OwnWindowTreeClient(), | 106 window_tree_client_setup_.OwnWindowTreeClient(), |
| 104 blocking_pool_owner_->pool()); | 107 blocking_pool_owner_->pool()); |
| 105 | 108 |
| 109 // TODO(jamescook): Pass a TestShellDelegate into WindowManager and use it to |
| 110 // create the various test delegates. |
| 111 WmShellTestApi().SetSystemTrayDelegate( |
| 112 base::MakeUnique<test::TestSystemTrayDelegate>()); |
| 113 |
| 106 ui::WindowTreeClient* window_tree_client = | 114 ui::WindowTreeClient* window_tree_client = |
| 107 window_manager_app_->window_manager()->window_tree_client(); | 115 window_manager_app_->window_manager()->window_tree_client(); |
| 108 window_tree_client_private_ = | 116 window_tree_client_private_ = |
| 109 base::MakeUnique<ui::WindowTreeClientPrivate>(window_tree_client); | 117 base::MakeUnique<ui::WindowTreeClientPrivate>(window_tree_client); |
| 110 int next_x = 0; | 118 int next_x = 0; |
| 111 CreateRootWindowController("800x600", &next_x); | 119 CreateRootWindowController("800x600", &next_x); |
| 112 } | 120 } |
| 113 | 121 |
| 114 std::vector<RootWindowController*> WmTestHelper::GetRootsOrderedByDisplayId() { | 122 std::vector<RootWindowController*> WmTestHelper::GetRootsOrderedByDisplayId() { |
| 115 std::set<RootWindowController*> roots = | 123 std::set<RootWindowController*> roots = |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 root_window_controller->display().id()) == | 183 root_window_controller->display().id()) == |
| 176 screen->display_list()->GetPrimaryDisplayIterator(); | 184 screen->display_list()->GetPrimaryDisplayIterator(); |
| 177 screen->display_list()->UpdateDisplay( | 185 screen->display_list()->UpdateDisplay( |
| 178 root_window_controller->display(), | 186 root_window_controller->display(), |
| 179 is_primary ? display::DisplayList::Type::PRIMARY | 187 is_primary ? display::DisplayList::Type::PRIMARY |
| 180 : display::DisplayList::Type::NOT_PRIMARY); | 188 : display::DisplayList::Type::NOT_PRIMARY); |
| 181 } | 189 } |
| 182 | 190 |
| 183 } // namespace mus | 191 } // namespace mus |
| 184 } // namespace ash | 192 } // namespace ash |
| OLD | NEW |