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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 uint32_t change_id, | 154 uint32_t change_id, |
155 ClientSpecificId requesting_client_id, | 155 ClientSpecificId requesting_client_id, |
156 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) { | 156 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) { |
157 got_create_top_level_window_ = true; | 157 got_create_top_level_window_ = true; |
158 change_id_ = change_id; | 158 change_id_ = change_id; |
159 } | 159 } |
160 | 160 |
161 void TestWindowManager::WmClientJankinessChanged(ClientSpecificId client_id, | 161 void TestWindowManager::WmClientJankinessChanged(ClientSpecificId client_id, |
162 bool janky) {} | 162 bool janky) {} |
163 | 163 |
164 void TestWindowManager::OnAccelerator(uint32_t id, mojom::EventPtr event) { | 164 void TestWindowManager::OnAccelerator(uint32_t id, |
| 165 std::unique_ptr<ui::Event> event) { |
165 on_accelerator_called_ = true; | 166 on_accelerator_called_ = true; |
166 on_accelerator_id_ = id; | 167 on_accelerator_id_ = id; |
167 } | 168 } |
168 | 169 |
169 // TestWindowTreeClient ------------------------------------------------------- | 170 // TestWindowTreeClient ------------------------------------------------------- |
170 | 171 |
171 TestWindowTreeClient::TestWindowTreeClient() | 172 TestWindowTreeClient::TestWindowTreeClient() |
172 : binding_(this), record_on_change_completed_(false) {} | 173 : binding_(this), record_on_change_completed_(false) {} |
173 TestWindowTreeClient::~TestWindowTreeClient() {} | 174 TestWindowTreeClient::~TestWindowTreeClient() {} |
174 | 175 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 262 |
262 void TestWindowTreeClient::OnWindowSharedPropertyChanged( | 263 void TestWindowTreeClient::OnWindowSharedPropertyChanged( |
263 uint32_t window, | 264 uint32_t window, |
264 const mojo::String& name, | 265 const mojo::String& name, |
265 mojo::Array<uint8_t> new_data) { | 266 mojo::Array<uint8_t> new_data) { |
266 tracker_.OnWindowSharedPropertyChanged(window, name, std::move(new_data)); | 267 tracker_.OnWindowSharedPropertyChanged(window, name, std::move(new_data)); |
267 } | 268 } |
268 | 269 |
269 void TestWindowTreeClient::OnWindowInputEvent(uint32_t event_id, | 270 void TestWindowTreeClient::OnWindowInputEvent(uint32_t event_id, |
270 uint32_t window, | 271 uint32_t window, |
271 mojom::EventPtr event, | 272 std::unique_ptr<ui::Event> event, |
272 uint32_t event_observer_id) { | 273 uint32_t event_observer_id) { |
273 tracker_.OnWindowInputEvent(window, std::move(event), event_observer_id); | 274 tracker_.OnWindowInputEvent(window, *event.get(), event_observer_id); |
274 } | 275 } |
275 | 276 |
276 void TestWindowTreeClient::OnEventObserved(mojom::EventPtr event, | 277 void TestWindowTreeClient::OnEventObserved(std::unique_ptr<ui::Event> event, |
277 uint32_t event_observer_id) { | 278 uint32_t event_observer_id) { |
278 tracker_.OnEventObserved(std::move(event), event_observer_id); | 279 tracker_.OnEventObserved(*event.get(), event_observer_id); |
279 } | 280 } |
280 | 281 |
281 void TestWindowTreeClient::OnWindowFocused(uint32_t focused_window_id) { | 282 void TestWindowTreeClient::OnWindowFocused(uint32_t focused_window_id) { |
282 tracker_.OnWindowFocused(focused_window_id); | 283 tracker_.OnWindowFocused(focused_window_id); |
283 } | 284 } |
284 | 285 |
285 void TestWindowTreeClient::OnWindowPredefinedCursorChanged( | 286 void TestWindowTreeClient::OnWindowPredefinedCursorChanged( |
286 uint32_t window_id, | 287 uint32_t window_id, |
287 mojom::Cursor cursor_id) { | 288 mojom::Cursor cursor_id) { |
288 tracker_.OnWindowPredefinedCursorChanged(window_id, cursor_id); | 289 tracker_.OnWindowPredefinedCursorChanged(window_id, cursor_id); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 return nullptr; | 486 return nullptr; |
486 if (!tree->AddWindow(parent_client_id, client_window_id)) | 487 if (!tree->AddWindow(parent_client_id, client_window_id)) |
487 return nullptr; | 488 return nullptr; |
488 *client_id = client_window_id; | 489 *client_id = client_window_id; |
489 return tree->GetWindowByClientId(client_window_id); | 490 return tree->GetWindowByClientId(client_window_id); |
490 } | 491 } |
491 | 492 |
492 } // namespace test | 493 } // namespace test |
493 } // namespace ws | 494 } // namespace ws |
494 } // namespace mus | 495 } // namespace mus |
OLD | NEW |