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

Side by Side Diff: mojo/public/cpp/application/lib/service_registry.h

Issue 1977043002: ApplicationConnection devolution, part 1. (Closed) Base URL: https://github.com/domokit/mojo.git@work791_service_registry_spimpl
Patch Set: rebased Created 4 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 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ 5 #ifndef MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_
6 #define MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ 6 #define MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "mojo/public/cpp/application/application_connection.h" 10 #include "mojo/public/cpp/application/application_connection.h"
11 #include "mojo/public/cpp/application/service_provider_impl.h" 11 #include "mojo/public/cpp/application/service_provider_impl.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 namespace internal { 14 namespace internal {
15 15
16 // A ServiceRegistry represents each half of a connection between two 16 // A ServiceRegistry represents each half of a connection between two
17 // applications, allowing customization of which services are published to the 17 // applications, allowing customization of which services are published to the
18 // other. 18 // other.
19 class ServiceRegistry : public ApplicationConnection { 19 class ServiceRegistry : public ApplicationConnection {
20 public: 20 public:
21 ServiceRegistry(); 21 ServiceRegistry();
22 ServiceRegistry(const ConnectionContext& connection_context, 22 ServiceRegistry(const ConnectionContext& connection_context,
23 InterfaceRequest<ServiceProvider> local_services); 23 InterfaceRequest<ServiceProvider> local_services);
24 ~ServiceRegistry() override; 24 ~ServiceRegistry() override;
25 25
26 // ApplicationConnection overrides. 26 // ApplicationConnection overrides.
27 void SetServiceConnectorForName(ServiceConnector* service_connector,
28 const std::string& interface_name) override;
29 ServiceProviderImpl& GetServiceProviderImpl() override; 27 ServiceProviderImpl& GetServiceProviderImpl() override;
30 const ConnectionContext& GetConnectionContext() const override;
31 const std::string& GetConnectionURL() override;
32 const std::string& GetRemoteApplicationURL() override;
33 28
34 void RemoveServiceConnectorForName(const std::string& interface_name); 29 void RemoveServiceConnectorForName(const std::string& interface_name);
35 30
36 private: 31 private:
37 ServiceProviderImpl service_provider_impl_; 32 ServiceProviderImpl service_provider_impl_;
38 33
39 MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceRegistry); 34 MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceRegistry);
40 }; 35 };
41 36
42 } // namespace internal 37 } // namespace internal
43 } // namespace mojo 38 } // namespace mojo
44 39
45 #endif // MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ 40 #endif // MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/application_connection.h ('k') | mojo/public/cpp/application/lib/service_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698