| 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 void TestWindowTreeClient::OnWindowFocused(uint32_t focused_window_id) { | 350 void TestWindowTreeClient::OnWindowFocused(uint32_t focused_window_id) { |
| 351 tracker_.OnWindowFocused(focused_window_id); | 351 tracker_.OnWindowFocused(focused_window_id); |
| 352 } | 352 } |
| 353 | 353 |
| 354 void TestWindowTreeClient::OnWindowPredefinedCursorChanged( | 354 void TestWindowTreeClient::OnWindowPredefinedCursorChanged( |
| 355 uint32_t window_id, | 355 uint32_t window_id, |
| 356 mojom::Cursor cursor_id) { | 356 mojom::Cursor cursor_id) { |
| 357 tracker_.OnWindowPredefinedCursorChanged(window_id, cursor_id); | 357 tracker_.OnWindowPredefinedCursorChanged(window_id, cursor_id); |
| 358 } | 358 } |
| 359 | 359 |
| 360 void TestWindowTreeClient::OnWindowSurfaceChanged( | |
| 361 Id window_id, | |
| 362 const cc::SurfaceId& surface_id, | |
| 363 const cc::SurfaceSequence& surface_sequence, | |
| 364 const gfx::Size& frame_size, | |
| 365 float device_scale_factor) {} | |
| 366 | |
| 367 void TestWindowTreeClient::OnDragDropStart( | 360 void TestWindowTreeClient::OnDragDropStart( |
| 368 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) {} | 361 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) {} |
| 369 | 362 |
| 370 void TestWindowTreeClient::OnDragEnter(uint32_t window, | 363 void TestWindowTreeClient::OnDragEnter(uint32_t window, |
| 371 uint32_t key_state, | 364 uint32_t key_state, |
| 372 const gfx::Point& position, | 365 const gfx::Point& position, |
| 373 uint32_t effect_bitmask, | 366 uint32_t effect_bitmask, |
| 374 const OnDragEnterCallback& callback) {} | 367 const OnDragEnterCallback& callback) {} |
| 375 | 368 |
| 376 void TestWindowTreeClient::OnDragOver(uint32_t window, | 369 void TestWindowTreeClient::OnDragOver(uint32_t window, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 // Destroy |window_server_| while the message-loop is still alive. | 478 // Destroy |window_server_| while the message-loop is still alive. |
| 486 window_server_.reset(); | 479 window_server_.reset(); |
| 487 } | 480 } |
| 488 | 481 |
| 489 // WindowEventTargetingHelper ------------------------------------------------ | 482 // WindowEventTargetingHelper ------------------------------------------------ |
| 490 | 483 |
| 491 WindowEventTargetingHelper::WindowEventTargetingHelper() | 484 WindowEventTargetingHelper::WindowEventTargetingHelper() |
| 492 : wm_client_(nullptr), | 485 : wm_client_(nullptr), |
| 493 display_binding_(nullptr), | 486 display_binding_(nullptr), |
| 494 display_(nullptr), | 487 display_(nullptr), |
| 495 display_compositor_(new DisplayCompositor(nullptr)) { | 488 display_compositor_(new DisplayCompositor()) { |
| 496 PlatformDisplayInitParams display_init_params; | 489 PlatformDisplayInitParams display_init_params; |
| 497 display_init_params.display_compositor = display_compositor_; | 490 display_init_params.display_compositor = display_compositor_; |
| 498 display_ = new Display(window_server(), display_init_params); | 491 display_ = new Display(window_server(), display_init_params); |
| 499 display_binding_ = new TestDisplayBinding(window_server()); | 492 display_binding_ = new TestDisplayBinding(window_server()); |
| 500 display_->Init(base::WrapUnique(display_binding_)); | 493 display_->Init(base::WrapUnique(display_binding_)); |
| 501 wm_client_ = ws_test_helper_.window_server_delegate()->last_client(); | 494 wm_client_ = ws_test_helper_.window_server_delegate()->last_client(); |
| 502 wm_client_->tracker()->changes()->clear(); | 495 wm_client_->tracker()->changes()->clear(); |
| 503 } | 496 } |
| 504 | 497 |
| 505 WindowEventTargetingHelper::~WindowEventTargetingHelper() {} | 498 WindowEventTargetingHelper::~WindowEventTargetingHelper() {} |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 return nullptr; | 600 return nullptr; |
| 608 if (!tree->AddWindow(parent_client_id, client_window_id)) | 601 if (!tree->AddWindow(parent_client_id, client_window_id)) |
| 609 return nullptr; | 602 return nullptr; |
| 610 *client_id = client_window_id; | 603 *client_id = client_window_id; |
| 611 return tree->GetWindowByClientId(client_window_id); | 604 return tree->GetWindowByClientId(client_window_id); |
| 612 } | 605 } |
| 613 | 606 |
| 614 } // namespace test | 607 } // namespace test |
| 615 } // namespace ws | 608 } // namespace ws |
| 616 } // namespace ui | 609 } // namespace ui |
| OLD | NEW |