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

Unified Diff: mojo/services/test_service/test_service_application.h

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/test_service/test_service_application.h
diff --git a/mojo/services/test_service/test_service_application.h b/mojo/services/test_service/test_service_application.h
index 8892f3059394867b387466f20c33c702cd18657d..06d24746b57ab9e77e82a0686f3260ec00481759 100644
--- a/mojo/services/test_service/test_service_application.h
+++ b/mojo/services/test_service/test_service_application.h
@@ -6,20 +6,35 @@
#define MOJO_SERVICES_TEST_SERVICE_TEST_SERVICE_APPLICATION_H_
#include "mojo/public/cpp/application/application_delegate.h"
+#include "mojo/public/cpp/application/interface_factory.h"
#include "mojo/public/cpp/system/macros.h"
namespace mojo {
class ApplicationConnection;
+
namespace test {
+class TestService;
+class TestTimeService;
-class TestServiceApplication : public ApplicationDelegate {
+class TestServiceApplication : public ApplicationDelegate,
+ public InterfaceFactory<TestService>,
+ public InterfaceFactory<TestTimeService> {
public:
TestServiceApplication();
virtual ~TestServiceApplication();
+ // ApplicationDelegate implementation.
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
MOJO_OVERRIDE;
+ // InterfaceFactory<TestService> implementation.
+ virtual void Create(ApplicationConnection* connection,
+ InterfaceRequest<TestService> request) MOJO_OVERRIDE;
+
+ // InterfaceFactory<TestTimeService> implementation.
+ virtual void Create(ApplicationConnection* connection,
+ InterfaceRequest<TestTimeService> request) MOJO_OVERRIDE;
+
void AddRef();
void ReleaseRef();
« no previous file with comments | « mojo/services/test_service/test_request_tracker_impl.cc ('k') | mojo/services/test_service/test_service_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698