OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ | |
6 #define MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "mojo/public/cpp/application/application_connection.h" | |
11 #include "mojo/public/cpp/application/service_provider_impl.h" | |
12 | |
13 namespace mojo { | |
14 namespace internal { | |
15 | |
16 // A ServiceRegistry represents each half of a connection between two | |
17 // applications, allowing customization of which services are published to the | |
18 // other. | |
19 class ServiceRegistry : public ApplicationConnection { | |
20 public: | |
21 ServiceRegistry(); | |
22 ServiceRegistry(const ConnectionContext& connection_context, | |
23 InterfaceRequest<ServiceProvider> local_services); | |
24 ~ServiceRegistry() override; | |
25 | |
26 // ApplicationConnection overrides. | |
27 ServiceProviderImpl& GetServiceProviderImpl() override; | |
28 | |
29 void RemoveServiceConnectorForName(const std::string& interface_name); | |
30 | |
31 private: | |
32 ServiceProviderImpl service_provider_impl_; | |
33 | |
34 MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceRegistry); | |
35 }; | |
36 | |
37 } // namespace internal | |
38 } // namespace mojo | |
39 | |
40 #endif // MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ | |
OLD | NEW |