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

Side by Side Diff: services/service_manager/tests/connect/connect_test_app.cc

Issue 2850743004: Replace ServiceInfo with BindSourceInfo. (Closed)
Patch Set: . Created 3 years, 7 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
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 <memory> 5 #include <memory>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 base::Bind(&ConnectTestApp::OnConnectionError, 65 base::Bind(&ConnectTestApp::OnConnectionError,
66 base::Unretained(this))); 66 base::Unretained(this)));
67 standalone_bindings_.set_connection_error_handler( 67 standalone_bindings_.set_connection_error_handler(
68 base::Bind(&ConnectTestApp::OnConnectionError, 68 base::Bind(&ConnectTestApp::OnConnectionError,
69 base::Unretained(this))); 69 base::Unretained(this)));
70 registry_.AddInterface<test::mojom::ConnectTestService>(this); 70 registry_.AddInterface<test::mojom::ConnectTestService>(this);
71 registry_.AddInterface<test::mojom::StandaloneApp>(this); 71 registry_.AddInterface<test::mojom::StandaloneApp>(this);
72 registry_.AddInterface<test::mojom::BlockedInterface>(this); 72 registry_.AddInterface<test::mojom::BlockedInterface>(this);
73 registry_.AddInterface<test::mojom::UserIdTest>(this); 73 registry_.AddInterface<test::mojom::UserIdTest>(this);
74 } 74 }
75 void OnBindInterface(const ServiceInfo& source_info, 75 void OnBindInterface(const BindSourceInfo& source_info,
76 const std::string& interface_name, 76 const std::string& interface_name,
77 mojo::ScopedMessagePipeHandle interface_pipe) override { 77 mojo::ScopedMessagePipeHandle interface_pipe) override {
78 registry_.BindInterface(source_info.identity, interface_name, 78 registry_.BindInterface(source_info.identity, interface_name,
79 std::move(interface_pipe)); 79 std::move(interface_pipe));
80 } 80 }
81 81
82 // InterfaceFactory<test::mojom::ConnectTestService>: 82 // InterfaceFactory<test::mojom::ConnectTestService>:
83 void Create(const Identity& remote_identity, 83 void Create(const Identity& remote_identity,
84 test::mojom::ConnectTestServiceRequest request) override { 84 test::mojom::ConnectTestServiceRequest request) override {
85 bindings_.AddBinding(this, std::move(request)); 85 bindings_.AddBinding(this, std::move(request));
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 DISALLOW_COPY_AND_ASSIGN(ConnectTestApp); 219 DISALLOW_COPY_AND_ASSIGN(ConnectTestApp);
220 }; 220 };
221 221
222 } // namespace service_manager 222 } // namespace service_manager
223 223
224 MojoResult ServiceMain(MojoHandle service_request_handle) { 224 MojoResult ServiceMain(MojoHandle service_request_handle) {
225 service_manager::ServiceRunner runner(new service_manager::ConnectTestApp); 225 service_manager::ServiceRunner runner(new service_manager::ConnectTestApp);
226 return runner.Run(service_request_handle); 226 return runner.Run(service_request_handle);
227 } 227 }
OLDNEW
« no previous file with comments | « services/service_manager/service_manager.cc ('k') | services/service_manager/tests/connect/connect_test_class_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698