| 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 "services/ui/ws/test_utils.h" | 5 #include "services/ui/ws/test_utils.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
| 11 #include "gpu/ipc/client/gpu_channel_host.h" | 11 #include "gpu/ipc/client/gpu_channel_host.h" |
| 12 #include "services/shell/public/interfaces/connector.mojom.h" | 12 #include "services/shell/public/interfaces/connector.mojom.h" |
| 13 #include "services/ui/public/interfaces/cursor.mojom.h" | 13 #include "services/ui/public/interfaces/cursor.mojom.h" |
| 14 #include "services/ui/surfaces/surfaces_state.h" | 14 #include "services/ui/surfaces/display_compositor.h" |
| 15 #include "services/ui/ws/display_binding.h" | 15 #include "services/ui/ws/display_binding.h" |
| 16 #include "services/ui/ws/display_manager.h" | 16 #include "services/ui/ws/display_manager.h" |
| 17 #include "services/ui/ws/platform_display_init_params.h" | 17 #include "services/ui/ws/platform_display_init_params.h" |
| 18 #include "services/ui/ws/server_window_surface_manager_test_api.h" | 18 #include "services/ui/ws/server_window_surface_manager_test_api.h" |
| 19 #include "services/ui/ws/window_manager_access_policy.h" | 19 #include "services/ui/ws/window_manager_access_policy.h" |
| 20 #include "services/ui/ws/window_manager_window_tree_factory.h" | 20 #include "services/ui/ws/window_manager_window_tree_factory.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 namespace ui { | 23 namespace ui { |
| 24 namespace ws { | 24 namespace ws { |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 // Destroy |window_server_| while the message-loop is still alive. | 478 // Destroy |window_server_| while the message-loop is still alive. |
| 479 window_server_.reset(); | 479 window_server_.reset(); |
| 480 } | 480 } |
| 481 | 481 |
| 482 // WindowEventTargetingHelper ------------------------------------------------ | 482 // WindowEventTargetingHelper ------------------------------------------------ |
| 483 | 483 |
| 484 WindowEventTargetingHelper::WindowEventTargetingHelper() | 484 WindowEventTargetingHelper::WindowEventTargetingHelper() |
| 485 : wm_client_(nullptr), | 485 : wm_client_(nullptr), |
| 486 display_binding_(nullptr), | 486 display_binding_(nullptr), |
| 487 display_(nullptr), | 487 display_(nullptr), |
| 488 surfaces_state_(new SurfacesState()) { | 488 display_compositor_(new DisplayCompositor()) { |
| 489 PlatformDisplayInitParams display_init_params; | 489 PlatformDisplayInitParams display_init_params; |
| 490 display_init_params.surfaces_state = surfaces_state_; | 490 display_init_params.display_compositor = display_compositor_; |
| 491 display_ = new Display(window_server(), display_init_params); | 491 display_ = new Display(window_server(), display_init_params); |
| 492 display_binding_ = new TestDisplayBinding(window_server()); | 492 display_binding_ = new TestDisplayBinding(window_server()); |
| 493 display_->Init(base::WrapUnique(display_binding_)); | 493 display_->Init(base::WrapUnique(display_binding_)); |
| 494 wm_client_ = ws_test_helper_.window_server_delegate()->last_client(); | 494 wm_client_ = ws_test_helper_.window_server_delegate()->last_client(); |
| 495 wm_client_->tracker()->changes()->clear(); | 495 wm_client_->tracker()->changes()->clear(); |
| 496 } | 496 } |
| 497 | 497 |
| 498 WindowEventTargetingHelper::~WindowEventTargetingHelper() {} | 498 WindowEventTargetingHelper::~WindowEventTargetingHelper() {} |
| 499 | 499 |
| 500 ServerWindow* WindowEventTargetingHelper::CreatePrimaryTree( | 500 ServerWindow* WindowEventTargetingHelper::CreatePrimaryTree( |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 return nullptr; | 600 return nullptr; |
| 601 if (!tree->AddWindow(parent_client_id, client_window_id)) | 601 if (!tree->AddWindow(parent_client_id, client_window_id)) |
| 602 return nullptr; | 602 return nullptr; |
| 603 *client_id = client_window_id; | 603 *client_id = client_window_id; |
| 604 return tree->GetWindowByClientId(client_window_id); | 604 return tree->GetWindowByClientId(client_window_id); |
| 605 } | 605 } |
| 606 | 606 |
| 607 } // namespace test | 607 } // namespace test |
| 608 } // namespace ws | 608 } // namespace ws |
| 609 } // namespace ui | 609 } // namespace ui |
| OLD | NEW |