| 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/wm_shell.h" | 7 #include "ash/common/wm_shell.h" |
| 8 #include "ash/common/wm_window.h" | 8 #include "ash/common/wm_window.h" |
| 9 #include "ash/mus/screen_mus.h" | 9 #include "ash/mus/screen_mus.h" |
| 10 #include "ash/mus/window_manager.h" | 10 #include "ash/mus/window_manager.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 window_manager_app_->window_manager_.reset(new WindowManager(nullptr)); | 102 window_manager_app_->window_manager_.reset(new WindowManager(nullptr)); |
| 103 window_manager_app_->window_manager()->shell_delegate_for_test_ = | 103 window_manager_app_->window_manager()->shell_delegate_for_test_ = |
| 104 base::MakeUnique<test::TestShellDelegate>(); | 104 base::MakeUnique<test::TestShellDelegate>(); |
| 105 | 105 |
| 106 window_tree_client_setup_.InitForWindowManager( | 106 window_tree_client_setup_.InitForWindowManager( |
| 107 window_manager_app_->window_manager_.get(), | 107 window_manager_app_->window_manager_.get(), |
| 108 window_manager_app_->window_manager_.get()); | 108 window_manager_app_->window_manager_.get()); |
| 109 aura::test::EnvTestHelper().SetWindowTreeClient( | 109 aura::test::EnvTestHelper().SetWindowTreeClient( |
| 110 window_tree_client_setup_.window_tree_client()); | 110 window_tree_client_setup_.window_tree_client()); |
| 111 // See comment in AshTestHelper for details on why NetworkHandler is not |
| 112 // initialized. |
| 113 const bool init_network_handler = false; |
| 111 window_manager_app_->InitWindowManager( | 114 window_manager_app_->InitWindowManager( |
| 112 window_tree_client_setup_.OwnWindowTreeClient(), | 115 window_tree_client_setup_.OwnWindowTreeClient(), |
| 113 blocking_pool_owner_->pool()); | 116 blocking_pool_owner_->pool(), init_network_handler); |
| 114 | 117 |
| 115 aura::WindowTreeClient* window_tree_client = | 118 aura::WindowTreeClient* window_tree_client = |
| 116 window_manager_app_->window_manager()->window_tree_client(); | 119 window_manager_app_->window_manager()->window_tree_client(); |
| 117 window_tree_client_private_ = | 120 window_tree_client_private_ = |
| 118 base::MakeUnique<aura::WindowTreeClientPrivate>(window_tree_client); | 121 base::MakeUnique<aura::WindowTreeClientPrivate>(window_tree_client); |
| 119 int next_x = 0; | 122 int next_x = 0; |
| 120 CreateRootWindowController("800x600", &next_x); | 123 CreateRootWindowController("800x600", &next_x); |
| 121 } | 124 } |
| 122 | 125 |
| 123 std::vector<RootWindowController*> WmTestHelper::GetRootsOrderedByDisplayId() { | 126 std::vector<RootWindowController*> WmTestHelper::GetRootsOrderedByDisplayId() { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 const bool is_primary = | 187 const bool is_primary = |
| 185 screen->display_list().FindDisplayById(updated_display.id()) == | 188 screen->display_list().FindDisplayById(updated_display.id()) == |
| 186 screen->display_list().GetPrimaryDisplayIterator(); | 189 screen->display_list().GetPrimaryDisplayIterator(); |
| 187 screen->display_list().UpdateDisplay( | 190 screen->display_list().UpdateDisplay( |
| 188 updated_display, is_primary ? display::DisplayList::Type::PRIMARY | 191 updated_display, is_primary ? display::DisplayList::Type::PRIMARY |
| 189 : display::DisplayList::Type::NOT_PRIMARY); | 192 : display::DisplayList::Type::NOT_PRIMARY); |
| 190 } | 193 } |
| 191 | 194 |
| 192 } // namespace mus | 195 } // namespace mus |
| 193 } // namespace ash | 196 } // namespace ash |
| OLD | NEW |