Index: mojo/public/cpp/application/application_connection.h |
diff --git a/mojo/public/cpp/application/application_connection.h b/mojo/public/cpp/application/application_connection.h |
index 2044af10a5a86cd935438839d92dc5a939abb25e..4aacab31e3e86023baa417fcb1881fc8e3e52084 100644 |
--- a/mojo/public/cpp/application/application_connection.h |
+++ b/mojo/public/cpp/application/application_connection.h |
@@ -7,6 +7,7 @@ |
#include <string> |
+#include "mojo/public/cpp/application/interface_provider.h" |
#include "mojo/public/cpp/application/lib/service_connector.h" |
namespace mojo { |
@@ -60,6 +61,12 @@ class ApplicationConnection { |
context)); |
} |
+ template <typename Interface> |
+ void AddServiceProvider(InterfaceProvider<Interface>* provider) { |
+ AddServiceConnector( |
+ new internal::InterfaceProviderConnector<Interface>(provider)); |
+ } |
+ |
// Impl’s constructor will receive one argument: |
// Impl::Impl(Application::Context* app_context) |
template <typename Impl> |