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

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

Issue 2498073003: Fix GPU service and display initialization race. (Closed)
Patch Set: Make function abstract. Created 4 years, 1 month 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.cc » ('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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 AddDisplay(); 410 AddDisplay();
411 } 411 }
412 412
413 Display* TestWindowServerDelegate::AddDisplay() { 413 Display* TestWindowServerDelegate::AddDisplay() {
414 // Display manages its own lifetime. 414 // Display manages its own lifetime.
415 Display* display = new Display(window_server_, PlatformDisplayInitParams()); 415 Display* display = new Display(window_server_, PlatformDisplayInitParams());
416 display->Init(nullptr); 416 display->Init(nullptr);
417 return display; 417 return display;
418 } 418 }
419 419
420 void TestWindowServerDelegate::StartDisplayInit() {}
421
420 void TestWindowServerDelegate::OnNoMoreDisplays() { 422 void TestWindowServerDelegate::OnNoMoreDisplays() {
421 got_on_no_more_displays_ = true; 423 got_on_no_more_displays_ = true;
422 } 424 }
423 425
424 std::unique_ptr<WindowTreeBinding> 426 std::unique_ptr<WindowTreeBinding>
425 TestWindowServerDelegate::CreateWindowTreeBinding( 427 TestWindowServerDelegate::CreateWindowTreeBinding(
426 BindingType type, 428 BindingType type,
427 ws::WindowServer* window_server, 429 ws::WindowServer* window_server,
428 ws::WindowTree* tree, 430 ws::WindowTree* tree,
429 mojom::WindowTreeRequest* tree_request, 431 mojom::WindowTreeRequest* tree_request,
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 return nullptr; 578 return nullptr;
577 if (!tree->AddWindow(parent_client_id, client_window_id)) 579 if (!tree->AddWindow(parent_client_id, client_window_id))
578 return nullptr; 580 return nullptr;
579 *client_id = client_window_id; 581 *client_id = client_window_id;
580 return tree->GetWindowByClientId(client_window_id); 582 return tree->GetWindowByClientId(client_window_id);
581 } 583 }
582 584
583 } // namespace test 585 } // namespace test
584 } // namespace ws 586 } // namespace ws
585 } // namespace ui 587 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/test_utils.h ('k') | services/ui/ws/window_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698