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

Unified Diff: services/ui/ws/window_tree_client_unittest.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.cc ('k') | services/video_capture/service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_tree_client_unittest.cc
diff --git a/services/ui/ws/window_tree_client_unittest.cc b/services/ui/ws/window_tree_client_unittest.cc
index a2e2ce42da354765dab81ee8d13f74117924eb47..d70250cbfa16cd52b5f0ed3c7c46d2776c03a11d 100644
--- a/services/ui/ws/window_tree_client_unittest.cc
+++ b/services/ui/ws/window_tree_client_unittest.cc
@@ -14,8 +14,8 @@
#include "cc/surfaces/local_surface_id_allocator.h"
#include "mojo/public/cpp/bindings/associated_binding.h"
#include "mojo/public/cpp/bindings/binding.h"
+#include "services/service_manager/public/cpp/binder_registry.h"
#include "services/service_manager/public/cpp/interface_factory.h"
-#include "services/service_manager/public/cpp/interface_registry.h"
#include "services/service_manager/public/cpp/service_test.h"
#include "services/ui/public/interfaces/constants.mojom.h"
#include "services/ui/public/interfaces/window_tree.mojom.h"
@@ -678,14 +678,16 @@ class WindowTreeClientTest : public WindowServerServiceTestBase {
}
// WindowServerServiceTestBase:
- bool OnConnect(const service_manager::Identity& remote_identity,
- service_manager::InterfaceRegistry* registry) override {
- registry->AddInterface(client_factory_.get());
- return true;
+ void OnBindInterface(const service_manager::ServiceInfo& source_info,
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) override {
+ registry_.BindInterface(source_info.identity, interface_name,
+ std::move(interface_pipe));
}
void SetUp() override {
client_factory_ = base::MakeUnique<WindowTreeClientFactory>();
+ registry_.AddInterface(client_factory_.get());
WindowServerServiceTestBase::SetUp();
@@ -736,6 +738,7 @@ class WindowTreeClientTest : public WindowServerServiceTestBase {
int client_id_1_;
int client_id_2_;
Id root_window_id_;
+ service_manager::BinderRegistry registry_;
DISALLOW_COPY_AND_ASSIGN(WindowTreeClientTest);
};
« no previous file with comments | « services/ui/ws/window_server_test_base.cc ('k') | services/video_capture/service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698