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

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

Issue 1973653002: Add a new way of using ServiceProviderImpl without InterfaceFactory. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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"
(...skipping 11 matching lines...) Expand all
22 class ServiceRegistry : public ServiceProvider, public ApplicationConnection { 22 class ServiceRegistry : public ServiceProvider, public ApplicationConnection {
23 public: 23 public:
24 ServiceRegistry(); 24 ServiceRegistry();
25 ServiceRegistry(const ConnectionContext& connection_context, 25 ServiceRegistry(const ConnectionContext& connection_context,
26 InterfaceRequest<ServiceProvider> local_services); 26 InterfaceRequest<ServiceProvider> local_services);
27 ~ServiceRegistry() override; 27 ~ServiceRegistry() override;
28 28
29 // ApplicationConnection overrides. 29 // ApplicationConnection overrides.
30 void SetServiceConnectorForName(ServiceConnector* service_connector, 30 void SetServiceConnectorForName(ServiceConnector* service_connector,
31 const std::string& interface_name) override; 31 const std::string& interface_name) override;
32 const ConnectionContext& GetConnectionContext() const override;
32 const std::string& GetConnectionURL() override; 33 const std::string& GetConnectionURL() override;
33 const std::string& GetRemoteApplicationURL() override; 34 const std::string& GetRemoteApplicationURL() override;
34 35
35 void RemoveServiceConnectorForName(const std::string& interface_name); 36 void RemoveServiceConnectorForName(const std::string& interface_name);
36 37
37 private: 38 private:
38 // ServiceProvider method. 39 // ServiceProvider method.
39 void ConnectToService(const String& service_name, 40 void ConnectToService(const String& service_name,
40 ScopedMessagePipeHandle client_handle) override; 41 ScopedMessagePipeHandle client_handle) override;
41 42
42 ConnectionContext connection_context_; 43 ConnectionContext connection_context_;
43 Binding<ServiceProvider> local_binding_; 44 Binding<ServiceProvider> local_binding_;
44 ServiceConnectorRegistry service_connector_registry_; 45 ServiceConnectorRegistry service_connector_registry_;
45 46
46 MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceRegistry); 47 MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceRegistry);
47 }; 48 };
48 49
49 } // namespace internal 50 } // namespace internal
50 } // namespace mojo 51 } // namespace mojo
51 52
52 #endif // MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ 53 #endif // MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698