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

Unified Diff: mojo/services/view_manager/main.cc

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix network_service_loader Created 6 years, 5 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: mojo/services/view_manager/main.cc
diff --git a/mojo/services/view_manager/main.cc b/mojo/services/view_manager/main.cc
index d5115055fc772e4b47b3880458051c1d5eb02291..3a809969c11371796551dcd99d48c88de3daf74c 100644
--- a/mojo/services/view_manager/main.cc
+++ b/mojo/services/view_manager/main.cc
@@ -10,19 +10,26 @@ namespace mojo {
namespace view_manager {
namespace service {
-class ViewManagerApp : public ApplicationDelegate {
+class ViewManagerApp : public ApplicationDelegate,
+ public InterfaceFactory<ViewManagerInitService> {
public:
ViewManagerApp() {}
virtual ~ViewManagerApp() {}
- virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
- MOJO_OVERRIDE {
+ virtual bool ConfigureIncomingConnection(
+ ApplicationConnection* connection) OVERRIDE {
// TODO(sky): this needs some sort of authentication as well as making sure
// we only ever have one active at a time.
- connection->AddService<ViewManagerInitServiceImpl>();
+ connection->AddService(this);
return true;
}
+ virtual void Create(
+ ApplicationConnection* connection,
+ InterfaceRequest<ViewManagerInitService> request) OVERRIDE {
+ BindToRequest(new ViewManagerInitServiceImpl(connection), &request);
+ }
+
private:
DISALLOW_COPY_AND_ASSIGN(ViewManagerApp);
};
« no previous file with comments | « mojo/services/test_service/test_time_service_impl.h ('k') | mojo/services/view_manager/root_node_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698