| 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 return std::move(binding); | 523 return std::move(binding); |
| 524 } | 524 } |
| 525 | 525 |
| 526 bool TestWindowServerDelegate::IsTestConfig() const { | 526 bool TestWindowServerDelegate::IsTestConfig() const { |
| 527 return true; | 527 return true; |
| 528 } | 528 } |
| 529 | 529 |
| 530 // WindowServerTestHelper --------------------------------------------------- | 530 // WindowServerTestHelper --------------------------------------------------- |
| 531 | 531 |
| 532 WindowServerTestHelper::WindowServerTestHelper() | 532 WindowServerTestHelper::WindowServerTestHelper() |
| 533 : cursor_id_(mojom::CursorType::CURSOR_NULL), | 533 : cursor_id_(mojom::CursorType::kNull), |
| 534 platform_display_factory_(&cursor_id_) { | 534 platform_display_factory_(&cursor_id_) { |
| 535 // Some tests create their own message loop, for example to add a task runner. | 535 // Some tests create their own message loop, for example to add a task runner. |
| 536 if (!base::MessageLoop::current()) | 536 if (!base::MessageLoop::current()) |
| 537 message_loop_ = base::MakeUnique<base::MessageLoop>(); | 537 message_loop_ = base::MakeUnique<base::MessageLoop>(); |
| 538 PlatformDisplay::set_factory_for_testing(&platform_display_factory_); | 538 PlatformDisplay::set_factory_for_testing(&platform_display_factory_); |
| 539 window_server_ = base::MakeUnique<WindowServer>(&window_server_delegate_); | 539 window_server_ = base::MakeUnique<WindowServer>(&window_server_delegate_); |
| 540 window_server_delegate_.set_window_server(window_server_.get()); | 540 window_server_delegate_.set_window_server(window_server_.get()); |
| 541 } | 541 } |
| 542 | 542 |
| 543 WindowServerTestHelper::~WindowServerTestHelper() { | 543 WindowServerTestHelper::~WindowServerTestHelper() { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 if (!tree->AddWindow(parent_client_id, client_window_id)) | 690 if (!tree->AddWindow(parent_client_id, client_window_id)) |
| 691 return nullptr; | 691 return nullptr; |
| 692 if (client_id) | 692 if (client_id) |
| 693 *client_id = client_window_id; | 693 *client_id = client_window_id; |
| 694 return tree->GetWindowByClientId(client_window_id); | 694 return tree->GetWindowByClientId(client_window_id); |
| 695 } | 695 } |
| 696 | 696 |
| 697 } // namespace test | 697 } // namespace test |
| 698 } // namespace ws | 698 } // namespace ws |
| 699 } // namespace ui | 699 } // namespace ui |
| OLD | NEW |