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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 void TestWindowTreeClient::Bind( | 264 void TestWindowTreeClient::Bind( |
265 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { | 265 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { |
266 binding_.Bind(std::move(request)); | 266 binding_.Bind(std::move(request)); |
267 } | 267 } |
268 | 268 |
269 void TestWindowTreeClient::OnEmbed(uint16_t client_id, | 269 void TestWindowTreeClient::OnEmbed(uint16_t client_id, |
270 mojom::WindowDataPtr root, | 270 mojom::WindowDataPtr root, |
271 ui::mojom::WindowTreePtr tree, | 271 ui::mojom::WindowTreePtr tree, |
272 int64_t display_id, | 272 int64_t display_id, |
273 Id focused_window_id, | 273 Id focused_window_id, |
274 bool drawn) { | 274 bool drawn, |
| 275 const cc::FrameSinkId& frame_sink_id) { |
275 // TODO(sky): add test coverage of |focused_window_id|. | 276 // TODO(sky): add test coverage of |focused_window_id|. |
276 tracker_.OnEmbed(client_id, std::move(root), drawn); | 277 tracker_.OnEmbed(client_id, std::move(root), drawn, frame_sink_id); |
277 } | 278 } |
278 | 279 |
279 void TestWindowTreeClient::OnEmbeddedAppDisconnected(uint32_t window) { | 280 void TestWindowTreeClient::OnEmbeddedAppDisconnected(uint32_t window) { |
280 tracker_.OnEmbeddedAppDisconnected(window); | 281 tracker_.OnEmbeddedAppDisconnected(window); |
281 } | 282 } |
282 | 283 |
283 void TestWindowTreeClient::OnUnembed(Id window_id) { | 284 void TestWindowTreeClient::OnUnembed(Id window_id) { |
284 tracker_.OnUnembed(window_id); | 285 tracker_.OnUnembed(window_id); |
285 } | 286 } |
286 | 287 |
287 void TestWindowTreeClient::OnCaptureChanged(Id new_capture_window_id, | 288 void TestWindowTreeClient::OnCaptureChanged(Id new_capture_window_id, |
288 Id old_capture_window_id) { | 289 Id old_capture_window_id) { |
289 tracker_.OnCaptureChanged(new_capture_window_id, old_capture_window_id); | 290 tracker_.OnCaptureChanged(new_capture_window_id, old_capture_window_id); |
290 } | 291 } |
291 | 292 |
292 void TestWindowTreeClient::OnTopLevelCreated(uint32_t change_id, | 293 void TestWindowTreeClient::OnTopLevelCreated( |
293 mojom::WindowDataPtr data, | 294 uint32_t change_id, |
294 int64_t display_id, | 295 mojom::WindowDataPtr data, |
295 bool drawn) { | 296 int64_t display_id, |
296 tracker_.OnTopLevelCreated(change_id, std::move(data), drawn); | 297 bool drawn, |
| 298 const cc::FrameSinkId& frame_sink_id) { |
| 299 tracker_.OnTopLevelCreated(change_id, std::move(data), drawn, frame_sink_id); |
297 } | 300 } |
298 | 301 |
299 void TestWindowTreeClient::OnWindowBoundsChanged( | 302 void TestWindowTreeClient::OnWindowBoundsChanged( |
300 uint32_t window, | 303 uint32_t window, |
301 const gfx::Rect& old_bounds, | 304 const gfx::Rect& old_bounds, |
302 const gfx::Rect& new_bounds, | 305 const gfx::Rect& new_bounds, |
303 const base::Optional<cc::LocalSurfaceId>& local_surface_id) { | 306 const base::Optional<cc::LocalSurfaceId>& local_surface_id) { |
304 tracker_.OnWindowBoundsChanged(window, std::move(old_bounds), | 307 tracker_.OnWindowBoundsChanged(window, std::move(old_bounds), |
305 std::move(new_bounds), local_surface_id); | 308 std::move(new_bounds), local_surface_id); |
306 } | 309 } |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 if (!tree->AddWindow(parent_client_id, client_window_id)) | 645 if (!tree->AddWindow(parent_client_id, client_window_id)) |
643 return nullptr; | 646 return nullptr; |
644 if (client_id) | 647 if (client_id) |
645 *client_id = client_window_id; | 648 *client_id = client_window_id; |
646 return tree->GetWindowByClientId(client_window_id); | 649 return tree->GetWindowByClientId(client_window_id); |
647 } | 650 } |
648 | 651 |
649 } // namespace test | 652 } // namespace test |
650 } // namespace ws | 653 } // namespace ws |
651 } // namespace ui | 654 } // namespace ui |
OLD | NEW |