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

Unified Diff: mojo/public/cpp/application/application_connection.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « examples/bank_app/bank.cc ('k') | mojo/public/cpp/application/lib/service_registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e665cd4cb87377bf3fb3930248529729798e0124..49a0da8c5068e6c1b0a2268df376d50f54c83e91 100644
--- a/mojo/public/cpp/application/application_connection.h
+++ b/mojo/public/cpp/application/application_connection.h
@@ -5,6 +5,7 @@
#ifndef MOJO_PUBLIC_APPLICATION_APPLICATION_CONNECTION_H_
#define MOJO_PUBLIC_APPLICATION_APPLICATION_CONNECTION_H_
+#include <memory>
#include <string>
#include "mojo/public/cpp/application/lib/interface_factory_connector.h"
@@ -46,33 +47,13 @@ class ApplicationConnection {
// |factory| will create implementations of Interface on demand.
template <typename Interface>
void AddService(InterfaceFactory<Interface>* factory) {
- SetServiceConnectorForName(
- new internal::InterfaceFactoryConnector<Interface>(factory),
+ GetServiceProviderImpl().AddServiceForName(
+ std::unique_ptr<ServiceConnector>(
+ new internal::InterfaceFactoryConnector<Interface>(factory)),
Interface::Name_);
}
virtual ServiceProviderImpl& GetServiceProviderImpl() = 0;
-
- virtual const ConnectionContext& GetConnectionContext() const = 0;
-
- // Returns the URL that was used by the source application to establish a
- // connection to the destination application.
- //
- // When ApplicationConnection is representing an incoming connection this can
- // be different than the URL the application was initially loaded from, if the
- // application handles multiple URLs. Note that this is the URL after all
- // URL rewriting and HTTP redirects have been performed.
- //
- // When ApplicationConnection is representing and outgoing connection, this
- // will be the same as the value returned by GetRemoveApplicationURL().
- virtual const std::string& GetConnectionURL() = 0;
-
- // Returns the URL identifying the remote application on this connection.
- virtual const std::string& GetRemoteApplicationURL() = 0;
-
- private:
- virtual void SetServiceConnectorForName(ServiceConnector* service_connector,
- const std::string& name) = 0;
};
} // namespace mojo
« no previous file with comments | « examples/bank_app/bank.cc ('k') | mojo/public/cpp/application/lib/service_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698