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 "components/mus/ws/test_utils.h" | 5 #include "components/mus/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 "components/mus/surfaces/surfaces_state.h" | 9 #include "components/mus/surfaces/surfaces_state.h" |
10 #include "components/mus/ws/display_binding.h" | 10 #include "components/mus/ws/display_binding.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 TestPlatformDisplayFactory::TestPlatformDisplayFactory( | 100 TestPlatformDisplayFactory::TestPlatformDisplayFactory( |
101 int32_t* cursor_id_storage) | 101 int32_t* cursor_id_storage) |
102 : cursor_id_storage_(cursor_id_storage) {} | 102 : cursor_id_storage_(cursor_id_storage) {} |
103 | 103 |
104 TestPlatformDisplayFactory::~TestPlatformDisplayFactory() {} | 104 TestPlatformDisplayFactory::~TestPlatformDisplayFactory() {} |
105 | 105 |
106 PlatformDisplay* TestPlatformDisplayFactory::CreatePlatformDisplay() { | 106 PlatformDisplay* TestPlatformDisplayFactory::CreatePlatformDisplay() { |
107 return new TestPlatformDisplay(cursor_id_storage_); | 107 return new TestPlatformDisplay(cursor_id_storage_); |
108 } | 108 } |
109 | 109 |
| 110 // TestPlatformDisplayDelegate ------------------------------------------------- |
| 111 |
| 112 TestPlatformDisplayDelegate::TestPlatformDisplayDelegate( |
| 113 std::unique_ptr<ServerWindow> root) |
| 114 : root_(std::move(root)) {} |
| 115 |
| 116 TestPlatformDisplayDelegate::~TestPlatformDisplayDelegate() {} |
| 117 |
| 118 ServerWindow* TestPlatformDisplayDelegate::GetRootWindow() { |
| 119 return root_.get(); |
| 120 } |
| 121 |
110 // WindowTreeTestApi --------------------------------------------------------- | 122 // WindowTreeTestApi --------------------------------------------------------- |
111 | 123 |
112 WindowTreeTestApi::WindowTreeTestApi(WindowTree* tree) : tree_(tree) {} | 124 WindowTreeTestApi::WindowTreeTestApi(WindowTree* tree) : tree_(tree) {} |
113 WindowTreeTestApi::~WindowTreeTestApi() {} | 125 WindowTreeTestApi::~WindowTreeTestApi() {} |
114 | 126 |
115 void WindowTreeTestApi::SetEventObserver(mojom::EventMatcherPtr matcher, | 127 void WindowTreeTestApi::SetEventObserver(mojom::EventMatcherPtr matcher, |
116 uint32_t event_observer_id) { | 128 uint32_t event_observer_id) { |
117 tree_->SetEventObserver(std::move(matcher), event_observer_id); | 129 tree_->SetEventObserver(std::move(matcher), event_observer_id); |
118 } | 130 } |
119 | 131 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 return nullptr; | 495 return nullptr; |
484 if (!tree->AddWindow(parent_client_id, client_window_id)) | 496 if (!tree->AddWindow(parent_client_id, client_window_id)) |
485 return nullptr; | 497 return nullptr; |
486 *client_id = client_window_id; | 498 *client_id = client_window_id; |
487 return tree->GetWindowByClientId(client_window_id); | 499 return tree->GetWindowByClientId(client_window_id); |
488 } | 500 } |
489 | 501 |
490 } // namespace test | 502 } // namespace test |
491 } // namespace ws | 503 } // namespace ws |
492 } // namespace mus | 504 } // namespace mus |
OLD | NEW |