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

Side by Side Diff: services/service_manager/tests/shutdown/shutdown_client_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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "mojo/public/cpp/bindings/binding_set.h" 7 #include "mojo/public/cpp/bindings/binding_set.h"
8 #include "services/service_manager/public/c/main.h" 8 #include "services/service_manager/public/c/main.h"
9 #include "services/service_manager/public/cpp/binder_registry.h" 9 #include "services/service_manager/public/cpp/binder_registry.h"
10 #include "services/service_manager/public/cpp/connector.h" 10 #include "services/service_manager/public/cpp/connector.h"
(...skipping 11 matching lines...) Expand all
22 public mojom::ShutdownTestClientController, 22 public mojom::ShutdownTestClientController,
23 public mojom::ShutdownTestClient { 23 public mojom::ShutdownTestClient {
24 public: 24 public:
25 ShutdownClientApp() { 25 ShutdownClientApp() {
26 registry_.AddInterface<mojom::ShutdownTestClientController>(this); 26 registry_.AddInterface<mojom::ShutdownTestClientController>(this);
27 } 27 }
28 ~ShutdownClientApp() override {} 28 ~ShutdownClientApp() override {}
29 29
30 private: 30 private:
31 // service_manager::Service: 31 // service_manager::Service:
32 void OnBindInterface(const ServiceInfo& source_info, 32 void OnBindInterface(const BindSourceInfo& source_info,
33 const std::string& interface_name, 33 const std::string& interface_name,
34 mojo::ScopedMessagePipeHandle interface_pipe) override { 34 mojo::ScopedMessagePipeHandle interface_pipe) override {
35 registry_.BindInterface(source_info.identity, interface_name, 35 registry_.BindInterface(source_info.identity, interface_name,
36 std::move(interface_pipe)); 36 std::move(interface_pipe));
37 } 37 }
38 38
39 // InterfaceFactory<mojom::ShutdownTestClientController>: 39 // InterfaceFactory<mojom::ShutdownTestClientController>:
40 void Create(const Identity& remote_identity, 40 void Create(const Identity& remote_identity,
41 mojom::ShutdownTestClientControllerRequest request) override { 41 mojom::ShutdownTestClientControllerRequest request) override {
42 bindings_.AddBinding(this, std::move(request)); 42 bindings_.AddBinding(this, std::move(request));
(...skipping 25 matching lines...) Expand all
68 68
69 DISALLOW_COPY_AND_ASSIGN(ShutdownClientApp); 69 DISALLOW_COPY_AND_ASSIGN(ShutdownClientApp);
70 }; 70 };
71 71
72 } // namespace service_manager 72 } // namespace service_manager
73 73
74 MojoResult ServiceMain(MojoHandle service_request_handle) { 74 MojoResult ServiceMain(MojoHandle service_request_handle) {
75 service_manager::ServiceRunner runner(new service_manager::ShutdownClientApp); 75 service_manager::ServiceRunner runner(new service_manager::ShutdownClientApp);
76 return runner.Run(service_request_handle); 76 return runner.Run(service_request_handle);
77 } 77 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698