| 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" |
| 9 #include "ash/common/test/test_system_tray_delegate.h" | 10 #include "ash/common/test/test_system_tray_delegate.h" |
| 10 #include "ash/common/test/wm_shell_test_api.h" | 11 #include "ash/common/test/wm_shell_test_api.h" |
| 11 #include "ash/common/wm_shell.h" | 12 #include "ash/common/wm_shell.h" |
| 12 #include "ash/mus/root_window_controller.h" | 13 #include "ash/mus/root_window_controller.h" |
| 13 #include "ash/mus/window_manager.h" | 14 #include "ash/mus/window_manager.h" |
| 14 #include "ash/mus/window_manager_application.h" | 15 #include "ash/mus/window_manager_application.h" |
| 15 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
| 16 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
| 17 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 18 #include "base/strings/string_split.h" | 19 #include "base/strings/string_split.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 window_manager_app_->window_manager_.get(), | 104 window_manager_app_->window_manager_.get(), |
| 104 window_manager_app_->window_manager_.get()); | 105 window_manager_app_->window_manager_.get()); |
| 105 window_manager_app_->InitWindowManager( | 106 window_manager_app_->InitWindowManager( |
| 106 window_tree_client_setup_.OwnWindowTreeClient(), | 107 window_tree_client_setup_.OwnWindowTreeClient(), |
| 107 blocking_pool_owner_->pool()); | 108 blocking_pool_owner_->pool()); |
| 108 | 109 |
| 109 // TODO(jamescook): Pass a TestShellDelegate into WindowManager and use it to | 110 // TODO(jamescook): Pass a TestShellDelegate into WindowManager and use it to |
| 110 // create the various test delegates. | 111 // create the various test delegates. |
| 111 WmShellTestApi().SetSystemTrayDelegate( | 112 WmShellTestApi().SetSystemTrayDelegate( |
| 112 base::MakeUnique<test::TestSystemTrayDelegate>()); | 113 base::MakeUnique<test::TestSystemTrayDelegate>()); |
| 114 WmShellTestApi().SetNewWindowClient(base::MakeUnique<TestNewWindowClient>()); |
| 113 | 115 |
| 114 ui::WindowTreeClient* window_tree_client = | 116 ui::WindowTreeClient* window_tree_client = |
| 115 window_manager_app_->window_manager()->window_tree_client(); | 117 window_manager_app_->window_manager()->window_tree_client(); |
| 116 window_tree_client_private_ = | 118 window_tree_client_private_ = |
| 117 base::MakeUnique<ui::WindowTreeClientPrivate>(window_tree_client); | 119 base::MakeUnique<ui::WindowTreeClientPrivate>(window_tree_client); |
| 118 int next_x = 0; | 120 int next_x = 0; |
| 119 CreateRootWindowController("800x600", &next_x); | 121 CreateRootWindowController("800x600", &next_x); |
| 120 } | 122 } |
| 121 | 123 |
| 122 std::vector<RootWindowController*> WmTestHelper::GetRootsOrderedByDisplayId() { | 124 std::vector<RootWindowController*> WmTestHelper::GetRootsOrderedByDisplayId() { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 root_window_controller->display().id()) == | 185 root_window_controller->display().id()) == |
| 184 screen->display_list()->GetPrimaryDisplayIterator(); | 186 screen->display_list()->GetPrimaryDisplayIterator(); |
| 185 screen->display_list()->UpdateDisplay( | 187 screen->display_list()->UpdateDisplay( |
| 186 root_window_controller->display(), | 188 root_window_controller->display(), |
| 187 is_primary ? display::DisplayList::Type::PRIMARY | 189 is_primary ? display::DisplayList::Type::PRIMARY |
| 188 : display::DisplayList::Type::NOT_PRIMARY); | 190 : display::DisplayList::Type::NOT_PRIMARY); |
| 189 } | 191 } |
| 190 | 192 |
| 191 } // namespace mus | 193 } // namespace mus |
| 192 } // namespace ash | 194 } // namespace ash |
| OLD | NEW |