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

Unified Diff: services/ui/ws/window_server_test_base.cc

Issue 2795883002: Eliminate OnConnect usage (Closed)
Patch Set: . Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/ws/window_server_test_base.h ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_server_test_base.cc
diff --git a/services/ui/ws/window_server_test_base.cc b/services/ui/ws/window_server_test_base.cc
index 34f099670fa0d2bfefa01ba9eb4b8a41d6e4c899..2062520b7b08fbd74a44c8a8d810395f27decb17 100644
--- a/services/ui/ws/window_server_test_base.cc
+++ b/services/ui/ws/window_server_test_base.cc
@@ -12,7 +12,6 @@
#include "base/test/test_timeouts.h"
#include "base/threading/thread_task_runner_handle.h"
#include "services/service_manager/public/cpp/connector.h"
-#include "services/service_manager/public/cpp/interface_registry.h"
#include "ui/aura/env.h"
#include "ui/aura/mus/window_tree_client.h"
#include "ui/aura/mus/window_tree_host_mus.h"
@@ -33,7 +32,9 @@ void TimeoutRunLoop(const base::Closure& timeout_task, bool* timeout) {
} // namespace
-WindowServerTestBase::WindowServerTestBase() {}
+WindowServerTestBase::WindowServerTestBase() {
+ registry_.AddInterface<mojom::WindowTreeClient>(this);
+}
WindowServerTestBase::~WindowServerTestBase() {}
@@ -114,11 +115,12 @@ void WindowServerTestBase::TearDown() {
WindowServerServiceTestBase::TearDown();
}
-bool WindowServerTestBase::OnConnect(
- const service_manager::Identity& remote_identity,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface<mojom::WindowTreeClient>(this);
- return true;
+void WindowServerTestBase::OnBindInterface(
+ const service_manager::ServiceInfo& source_info,
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) {
+ registry_.BindInterface(source_info.identity, interface_name,
+ std::move(interface_pipe));
}
void WindowServerTestBase::OnEmbed(
« no previous file with comments | « services/ui/ws/window_server_test_base.h ('k') | services/ui/ws/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698