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

Unified Diff: third_party/mojo/src/mojo/public/cpp/application/lib/service_registry.h

Issue 1127293003: Update mojo sdk to rev f84766d3b6420b7cf6a113d9d65d73cb5fe18d90 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/mojo/src/mojo/public/cpp/application/lib/service_registry.h
diff --git a/third_party/mojo/src/mojo/public/cpp/application/lib/service_registry.h b/third_party/mojo/src/mojo/public/cpp/application/lib/service_registry.h
index 6126c104e9336001757963b42ead846365fe773e..b303911d8941e5609b46768a8ac7d77554cde578 100644
--- a/third_party/mojo/src/mojo/public/cpp/application/lib/service_registry.h
+++ b/third_party/mojo/src/mojo/public/cpp/application/lib/service_registry.h
@@ -5,7 +5,10 @@
#ifndef MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_
#define MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_
+#include <string>
+
#include "mojo/public/cpp/application/application_connection.h"
+#include "mojo/public/cpp/application/lib/service_connector_registry.h"
#include "mojo/public/interfaces/application/service_provider.mojom.h"
namespace mojo {
@@ -15,8 +18,6 @@ class ApplicationImpl;
namespace internal {
-class ServiceConnectorBase;
-
// A ServiceRegistry represents each half of a connection between two
// applications, allowing customization of which services are published to the
// other.
@@ -31,12 +32,14 @@ class ServiceRegistry : public ServiceProvider, public ApplicationConnection {
~ServiceRegistry() override;
// ApplicationConnection overrides.
- void AddServiceConnector(ServiceConnectorBase* service_connector) override;
+ void SetServiceConnector(ServiceConnector* service_connector) override;
+ void SetServiceConnectorForName(ServiceConnector* service_connector,
+ const std::string& interface_name) override;
const std::string& GetConnectionURL() override;
const std::string& GetRemoteApplicationURL() override;
ServiceProvider* GetServiceProvider() override;
- virtual void RemoveServiceConnector(ServiceConnectorBase* service_connector);
+ void RemoveServiceConnectorForName(const std::string& interface_name);
private:
// ServiceProvider method.
@@ -48,14 +51,12 @@ class ServiceRegistry : public ServiceProvider, public ApplicationConnection {
const std::string remote_url_;
private:
- bool RemoveServiceConnectorInternal(ServiceConnectorBase* service_connector);
+ void RemoveServiceConnectorForNameInternal(const std::string& interface_name);
Application* application_;
- typedef std::map<std::string, ServiceConnectorBase*>
- NameToServiceConnectorMap;
- NameToServiceConnectorMap name_to_service_connector_;
Binding<ServiceProvider> local_binding_;
ServiceProviderPtr remote_service_provider_;
+ ServiceConnectorRegistry service_connector_registry_;
MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceRegistry);
};

Powered by Google App Engine
This is Rietveld 408576698