Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: services/ui/ws/test_utils.cc

Issue 2414683003: Mus+Ash: propagate Surface ID to parents (Closed)
Patch Set: Don't follow null surface_info Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/ws/test_utils.h ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 void TestWindowTreeClient::OnWindowFocused(uint32_t focused_window_id) { 350 void TestWindowTreeClient::OnWindowFocused(uint32_t focused_window_id) {
351 tracker_.OnWindowFocused(focused_window_id); 351 tracker_.OnWindowFocused(focused_window_id);
352 } 352 }
353 353
354 void TestWindowTreeClient::OnWindowPredefinedCursorChanged( 354 void TestWindowTreeClient::OnWindowPredefinedCursorChanged(
355 uint32_t window_id, 355 uint32_t window_id,
356 mojom::Cursor cursor_id) { 356 mojom::Cursor cursor_id) {
357 tracker_.OnWindowPredefinedCursorChanged(window_id, cursor_id); 357 tracker_.OnWindowPredefinedCursorChanged(window_id, cursor_id);
358 } 358 }
359 359
360 void TestWindowTreeClient::OnWindowSurfaceChanged(
361 Id window_id,
362 const cc::SurfaceId& surface_id,
363 const cc::SurfaceSequence& surface_sequence,
364 const gfx::Size& frame_size,
365 float device_scale_factor) {}
366
360 void TestWindowTreeClient::OnDragDropStart( 367 void TestWindowTreeClient::OnDragDropStart(
361 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) {} 368 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data) {}
362 369
363 void TestWindowTreeClient::OnDragEnter(uint32_t window, 370 void TestWindowTreeClient::OnDragEnter(uint32_t window,
364 uint32_t key_state, 371 uint32_t key_state,
365 const gfx::Point& position, 372 const gfx::Point& position,
366 uint32_t effect_bitmask, 373 uint32_t effect_bitmask,
367 const OnDragEnterCallback& callback) {} 374 const OnDragEnterCallback& callback) {}
368 375
369 void TestWindowTreeClient::OnDragOver(uint32_t window, 376 void TestWindowTreeClient::OnDragOver(uint32_t window,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 // Destroy |window_server_| while the message-loop is still alive. 485 // Destroy |window_server_| while the message-loop is still alive.
479 window_server_.reset(); 486 window_server_.reset();
480 } 487 }
481 488
482 // WindowEventTargetingHelper ------------------------------------------------ 489 // WindowEventTargetingHelper ------------------------------------------------
483 490
484 WindowEventTargetingHelper::WindowEventTargetingHelper() 491 WindowEventTargetingHelper::WindowEventTargetingHelper()
485 : wm_client_(nullptr), 492 : wm_client_(nullptr),
486 display_binding_(nullptr), 493 display_binding_(nullptr),
487 display_(nullptr), 494 display_(nullptr),
488 display_compositor_(new DisplayCompositor()) { 495 display_compositor_(new DisplayCompositor(nullptr)) {
489 PlatformDisplayInitParams display_init_params; 496 PlatformDisplayInitParams display_init_params;
490 display_init_params.display_compositor = display_compositor_; 497 display_init_params.display_compositor = display_compositor_;
491 display_ = new Display(window_server(), display_init_params); 498 display_ = new Display(window_server(), display_init_params);
492 display_binding_ = new TestDisplayBinding(window_server()); 499 display_binding_ = new TestDisplayBinding(window_server());
493 display_->Init(base::WrapUnique(display_binding_)); 500 display_->Init(base::WrapUnique(display_binding_));
494 wm_client_ = ws_test_helper_.window_server_delegate()->last_client(); 501 wm_client_ = ws_test_helper_.window_server_delegate()->last_client();
495 wm_client_->tracker()->changes()->clear(); 502 wm_client_->tracker()->changes()->clear();
496 } 503 }
497 504
498 WindowEventTargetingHelper::~WindowEventTargetingHelper() {} 505 WindowEventTargetingHelper::~WindowEventTargetingHelper() {}
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 return nullptr; 607 return nullptr;
601 if (!tree->AddWindow(parent_client_id, client_window_id)) 608 if (!tree->AddWindow(parent_client_id, client_window_id))
602 return nullptr; 609 return nullptr;
603 *client_id = client_window_id; 610 *client_id = client_window_id;
604 return tree->GetWindowByClientId(client_window_id); 611 return tree->GetWindowByClientId(client_window_id);
605 } 612 }
606 613
607 } // namespace test 614 } // namespace test
608 } // namespace ws 615 } // namespace ws
609 } // namespace ui 616 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/test_utils.h ('k') | services/ui/ws/window_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698