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 "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "cc/output/copy_output_request.h" | 8 #include "cc/output/copy_output_request.h" |
9 #include "services/shell/public/interfaces/connector.mojom.h" | 9 #include "services/shell/public/interfaces/connector.mojom.h" |
10 #include "services/ui/surfaces/surfaces_state.h" | 10 #include "services/ui/surfaces/surfaces_state.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 TestPlatformDisplayFactory::TestPlatformDisplayFactory( | 101 TestPlatformDisplayFactory::TestPlatformDisplayFactory( |
102 int32_t* cursor_id_storage) | 102 int32_t* cursor_id_storage) |
103 : cursor_id_storage_(cursor_id_storage) {} | 103 : cursor_id_storage_(cursor_id_storage) {} |
104 | 104 |
105 TestPlatformDisplayFactory::~TestPlatformDisplayFactory() {} | 105 TestPlatformDisplayFactory::~TestPlatformDisplayFactory() {} |
106 | 106 |
107 PlatformDisplay* TestPlatformDisplayFactory::CreatePlatformDisplay() { | 107 PlatformDisplay* TestPlatformDisplayFactory::CreatePlatformDisplay() { |
108 return new TestPlatformDisplay(cursor_id_storage_); | 108 return new TestPlatformDisplay(cursor_id_storage_); |
109 } | 109 } |
110 | 110 |
| 111 // TestFrameGeneratorDelegate ------------------------------------------------- |
| 112 |
| 113 TestFrameGeneratorDelegate::TestFrameGeneratorDelegate( |
| 114 std::unique_ptr<ServerWindow> root) |
| 115 : root_(std::move(root)) {} |
| 116 |
| 117 TestFrameGeneratorDelegate::~TestFrameGeneratorDelegate() {} |
| 118 |
| 119 ServerWindow* TestFrameGeneratorDelegate::GetRootWindow() { |
| 120 return root_.get(); |
| 121 } |
| 122 |
| 123 const ViewportMetrics& TestFrameGeneratorDelegate::GetViewportMetrics() { |
| 124 return metrics_; |
| 125 } |
| 126 |
111 // WindowTreeTestApi --------------------------------------------------------- | 127 // WindowTreeTestApi --------------------------------------------------------- |
112 | 128 |
113 WindowTreeTestApi::WindowTreeTestApi(WindowTree* tree) : tree_(tree) {} | 129 WindowTreeTestApi::WindowTreeTestApi(WindowTree* tree) : tree_(tree) {} |
114 WindowTreeTestApi::~WindowTreeTestApi() {} | 130 WindowTreeTestApi::~WindowTreeTestApi() {} |
115 | 131 |
116 void WindowTreeTestApi::SetEventObserver(mojom::EventMatcherPtr matcher, | 132 void WindowTreeTestApi::SetEventObserver(mojom::EventMatcherPtr matcher, |
117 uint32_t event_observer_id) { | 133 uint32_t event_observer_id) { |
118 tree_->SetEventObserver(std::move(matcher), event_observer_id); | 134 tree_->SetEventObserver(std::move(matcher), event_observer_id); |
119 } | 135 } |
120 | 136 |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 return nullptr; | 504 return nullptr; |
489 if (!tree->AddWindow(parent_client_id, client_window_id)) | 505 if (!tree->AddWindow(parent_client_id, client_window_id)) |
490 return nullptr; | 506 return nullptr; |
491 *client_id = client_window_id; | 507 *client_id = client_window_id; |
492 return tree->GetWindowByClientId(client_window_id); | 508 return tree->GetWindowByClientId(client_window_id); |
493 } | 509 } |
494 | 510 |
495 } // namespace test | 511 } // namespace test |
496 } // namespace ws | 512 } // namespace ws |
497 } // namespace ui | 513 } // namespace ui |
OLD | NEW |