| 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" | 9 #include "ash/common/test/wm_shell_test_api.h" |
| 11 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| 12 #include "ash/common/wm_window.h" | 11 #include "ash/common/wm_window.h" |
| 13 #include "ash/mus/screen_mus.h" | 12 #include "ash/mus/screen_mus.h" |
| 14 #include "ash/mus/window_manager.h" | 13 #include "ash/mus/window_manager.h" |
| 15 #include "ash/mus/window_manager_application.h" | 14 #include "ash/mus/window_manager_application.h" |
| 15 #include "ash/test/test_shell_delegate.h" |
| 16 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
| 17 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
| 18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/strings/string_split.h" | 19 #include "base/strings/string_split.h" |
| 20 #include "base/test/sequenced_worker_pool_owner.h" | 20 #include "base/test/sequenced_worker_pool_owner.h" |
| 21 #include "services/ui/public/cpp/property_type_converters.h" | 21 #include "services/ui/public/cpp/property_type_converters.h" |
| 22 #include "ui/aura/mus/window_tree_client.h" | 22 #include "ui/aura/mus/window_tree_client.h" |
| 23 #include "ui/aura/test/env_test_helper.h" | 23 #include "ui/aura/test/env_test_helper.h" |
| 24 #include "ui/aura/test/mus/window_tree_client_private.h" | 24 #include "ui/aura/test/mus/window_tree_client_private.h" |
| 25 #include "ui/aura/window.h" | 25 #include "ui/aura/window.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 window_manager_app_ = base::MakeUnique<WindowManagerApplication>(); | 95 window_manager_app_ = base::MakeUnique<WindowManagerApplication>(); |
| 96 | 96 |
| 97 message_loop_.reset(new base::MessageLoopForUI()); | 97 message_loop_.reset(new base::MessageLoopForUI()); |
| 98 | 98 |
| 99 const size_t kMaxNumberThreads = 3u; // Matches that of content. | 99 const size_t kMaxNumberThreads = 3u; // Matches that of content. |
| 100 const char kThreadNamePrefix[] = "MashBlockingForTesting"; | 100 const char kThreadNamePrefix[] = "MashBlockingForTesting"; |
| 101 blocking_pool_owner_ = base::MakeUnique<base::SequencedWorkerPoolOwner>( | 101 blocking_pool_owner_ = base::MakeUnique<base::SequencedWorkerPoolOwner>( |
| 102 kMaxNumberThreads, kThreadNamePrefix); | 102 kMaxNumberThreads, kThreadNamePrefix); |
| 103 | 103 |
| 104 window_manager_app_->window_manager_.reset(new WindowManager(nullptr)); | 104 window_manager_app_->window_manager_.reset(new WindowManager(nullptr)); |
| 105 window_manager_app_->window_manager()->system_tray_delegate_for_test_ = | 105 window_manager_app_->window_manager()->shell_delegate_for_test_ = |
| 106 base::MakeUnique<test::TestSystemTrayDelegate>(); | 106 base::MakeUnique<test::TestShellDelegate>(); |
| 107 | 107 |
| 108 window_tree_client_setup_.InitForWindowManager( | 108 window_tree_client_setup_.InitForWindowManager( |
| 109 window_manager_app_->window_manager_.get(), | 109 window_manager_app_->window_manager_.get(), |
| 110 window_manager_app_->window_manager_.get()); | 110 window_manager_app_->window_manager_.get()); |
| 111 aura::test::EnvTestHelper().SetWindowTreeClient( | 111 aura::test::EnvTestHelper().SetWindowTreeClient( |
| 112 window_tree_client_setup_.window_tree_client()); | 112 window_tree_client_setup_.window_tree_client()); |
| 113 window_manager_app_->InitWindowManager( | 113 window_manager_app_->InitWindowManager( |
| 114 window_tree_client_setup_.OwnWindowTreeClient(), | 114 window_tree_client_setup_.OwnWindowTreeClient(), |
| 115 blocking_pool_owner_->pool()); | 115 blocking_pool_owner_->pool()); |
| 116 | 116 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 const bool is_primary = | 186 const bool is_primary = |
| 187 screen->display_list().FindDisplayById(updated_display.id()) == | 187 screen->display_list().FindDisplayById(updated_display.id()) == |
| 188 screen->display_list().GetPrimaryDisplayIterator(); | 188 screen->display_list().GetPrimaryDisplayIterator(); |
| 189 screen->display_list().UpdateDisplay( | 189 screen->display_list().UpdateDisplay( |
| 190 updated_display, is_primary ? display::DisplayList::Type::PRIMARY | 190 updated_display, is_primary ? display::DisplayList::Type::PRIMARY |
| 191 : display::DisplayList::Type::NOT_PRIMARY); | 191 : display::DisplayList::Type::NOT_PRIMARY); |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace mus | 194 } // namespace mus |
| 195 } // namespace ash | 195 } // namespace ash |
| OLD | NEW |