Index: mojo/services/test_service/test_service_application.cc |
diff --git a/mojo/services/test_service/test_service_application.cc b/mojo/services/test_service/test_service_application.cc |
index 097f368bc6593e45abeae8c594b9e0a23f669738..b605b8b64d5d75e2e9ce7676466a58621ba56b96 100644 |
--- a/mojo/services/test_service/test_service_application.cc |
+++ b/mojo/services/test_service/test_service_application.cc |
@@ -22,11 +22,23 @@ TestServiceApplication::~TestServiceApplication() { |
bool TestServiceApplication::ConfigureIncomingConnection( |
ApplicationConnection* connection) { |
- connection->AddService<TestServiceImpl>(this); |
- connection->AddService<TestTimeServiceImpl>(); |
+ connection->AddServiceProvider<TestService>(this); |
+ connection->AddServiceProvider<TestTimeService>(this); |
return true; |
} |
+void TestServiceApplication::BindToRequest( |
+ ApplicationConnection* connection, |
+ InterfaceRequest<TestService> request) { |
+ mojo::BindToRequest(new TestServiceImpl(connection, this), &request); |
+} |
+ |
+void TestServiceApplication::BindToRequest( |
+ ApplicationConnection* connection, |
+ InterfaceRequest<TestTimeService> request) { |
+ mojo::BindToRequest(new TestTimeServiceImpl(connection), &request); |
+} |
+ |
void TestServiceApplication::AddRef() { |
assert(ref_count_ >= 0); |
ref_count_++; |