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

Side by Side Diff: services/ui/public/cpp/tests/window_server_test_base.cc

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . Created 4 years, 4 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/public/cpp/tests/window_server_test_base.h ('k') | services/ui/service.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/public/cpp/tests/window_server_test_base.h" 5 #include "services/ui/public/cpp/tests/window_server_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 void WindowServerTestBase::SetUp() { 67 void WindowServerTestBase::SetUp() {
68 WindowServerServiceTestBase::SetUp(); 68 WindowServerServiceTestBase::SetUp();
69 69
70 CreateWindowTreeHost(connector(), this, &host_, this); 70 CreateWindowTreeHost(connector(), this, &host_, this);
71 71
72 ASSERT_TRUE(DoRunLoopWithTimeout()); // RunLoop should be quit by OnEmbed(). 72 ASSERT_TRUE(DoRunLoopWithTimeout()); // RunLoop should be quit by OnEmbed().
73 std::swap(window_manager_, most_recent_client_); 73 std::swap(window_manager_, most_recent_client_);
74 } 74 }
75 75
76 bool WindowServerTestBase::OnConnect(shell::Connection* connection) { 76 bool WindowServerTestBase::OnConnect(const shell::Identity& remote_identity,
77 connection->AddInterface<mojom::WindowTreeClient>(this); 77 shell::InterfaceRegistry* registry) {
78 registry->AddInterface<mojom::WindowTreeClient>(this);
78 return true; 79 return true;
79 } 80 }
80 81
81 void WindowServerTestBase::OnEmbed(Window* root) { 82 void WindowServerTestBase::OnEmbed(Window* root) {
82 most_recent_client_ = root->window_tree(); 83 most_recent_client_ = root->window_tree();
83 EXPECT_TRUE(QuitRunLoop()); 84 EXPECT_TRUE(QuitRunLoop());
84 ASSERT_TRUE(window_manager_client_); 85 ASSERT_TRUE(window_manager_client_);
85 window_manager_client_->AddActivationParent(root); 86 window_manager_client_->AddActivationParent(root);
86 } 87 }
87 88
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 ? window_manager_delegate_->OnAccelerator(accelerator_id, event) 154 ? window_manager_delegate_->OnAccelerator(accelerator_id, event)
154 : mojom::EventResult::UNHANDLED; 155 : mojom::EventResult::UNHANDLED;
155 } 156 }
156 157
157 void WindowServerTestBase::Create(const shell::Identity& remote_identity, 158 void WindowServerTestBase::Create(const shell::Identity& remote_identity,
158 mojom::WindowTreeClientRequest request) { 159 mojom::WindowTreeClientRequest request) {
159 new WindowTreeClient(this, nullptr, std::move(request)); 160 new WindowTreeClient(this, nullptr, std::move(request));
160 } 161 }
161 162
162 } // namespace ui 163 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/tests/window_server_test_base.h ('k') | services/ui/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698