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" |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 | 419 |
420 WindowEventTargetingHelper::WindowEventTargetingHelper() | 420 WindowEventTargetingHelper::WindowEventTargetingHelper() |
421 : wm_client_(nullptr), | 421 : wm_client_(nullptr), |
422 cursor_id_(0), | 422 cursor_id_(0), |
423 platform_display_factory_(&cursor_id_), | 423 platform_display_factory_(&cursor_id_), |
424 display_binding_(nullptr), | 424 display_binding_(nullptr), |
425 display_(nullptr), | 425 display_(nullptr), |
426 surfaces_state_(new SurfacesState()), | 426 surfaces_state_(new SurfacesState()), |
427 window_server_(nullptr) { | 427 window_server_(nullptr) { |
428 PlatformDisplay::set_factory_for_testing(&platform_display_factory_); | 428 PlatformDisplay::set_factory_for_testing(&platform_display_factory_); |
429 window_server_.reset( | 429 window_server_.reset(new WindowServer(&window_server_delegate_)); |
430 new WindowServer(&window_server_delegate_, surfaces_state_)); | |
431 PlatformDisplayInitParams display_init_params; | 430 PlatformDisplayInitParams display_init_params; |
432 display_init_params.surfaces_state = surfaces_state_; | 431 display_init_params.surfaces_state = surfaces_state_; |
433 display_ = new Display(window_server_.get(), display_init_params); | 432 display_ = new Display(window_server_.get(), display_init_params); |
434 display_binding_ = new TestDisplayBinding(window_server_.get()); | 433 display_binding_ = new TestDisplayBinding(window_server_.get()); |
435 display_->Init(base::WrapUnique(display_binding_)); | 434 display_->Init(base::WrapUnique(display_binding_)); |
436 wm_client_ = window_server_delegate_.last_client(); | 435 wm_client_ = window_server_delegate_.last_client(); |
437 wm_client_->tracker()->changes()->clear(); | 436 wm_client_->tracker()->changes()->clear(); |
438 } | 437 } |
439 | 438 |
440 WindowEventTargetingHelper::~WindowEventTargetingHelper() {} | 439 WindowEventTargetingHelper::~WindowEventTargetingHelper() {} |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 return nullptr; | 541 return nullptr; |
543 if (!tree->AddWindow(parent_client_id, client_window_id)) | 542 if (!tree->AddWindow(parent_client_id, client_window_id)) |
544 return nullptr; | 543 return nullptr; |
545 *client_id = client_window_id; | 544 *client_id = client_window_id; |
546 return tree->GetWindowByClientId(client_window_id); | 545 return tree->GetWindowByClientId(client_window_id); |
547 } | 546 } |
548 | 547 |
549 } // namespace test | 548 } // namespace test |
550 } // namespace ws | 549 } // namespace ws |
551 } // namespace ui | 550 } // namespace ui |
OLD | NEW |