Index: mojo/services/view_manager/view_manager_unittest.cc |
diff --git a/mojo/services/view_manager/view_manager_unittest.cc b/mojo/services/view_manager/view_manager_unittest.cc |
index b6aee00cb68d93b79cadd3b0ac61e06a38163be6..62da1c540718234bb25f73cb3422f2cde93e3e89 100644 |
--- a/mojo/services/view_manager/view_manager_unittest.cc |
+++ b/mojo/services/view_manager/view_manager_unittest.cc |
@@ -284,10 +284,9 @@ base::RunLoop* ViewManagerProxy::main_run_loop_ = NULL; |
bool ViewManagerProxy::in_embed_ = false; |
class TestViewManagerClientConnection |
- : public InterfaceImpl<ViewManagerClient> { |
+ : public InterfaceImplDeleteOnError<ViewManagerClient> { |
public: |
- TestViewManagerClientConnection(ApplicationConnection* app_connection) : |
- connection_(&tracker_) { |
+ TestViewManagerClientConnection() : connection_(&tracker_) { |
tracker_.set_delegate(&connection_); |
} |
@@ -364,7 +363,9 @@ class TestViewManagerClientConnection |
// Used with ViewManagerService::Embed(). Creates a |
// TestViewManagerClientConnection, which creates and owns the ViewManagerProxy. |
-class EmbedServiceLoader : public ServiceLoader, ApplicationDelegate { |
+class EmbedServiceLoader : public ServiceLoader, |
+ ApplicationDelegate, |
+ public InterfaceProvider<ViewManagerClient> { |
public: |
EmbedServiceLoader() {} |
virtual ~EmbedServiceLoader() {} |
@@ -384,10 +385,17 @@ class EmbedServiceLoader : public ServiceLoader, ApplicationDelegate { |
// ApplicationDelegate |
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection) |
OVERRIDE { |
- connection->AddService<TestViewManagerClientConnection>(); |
+ connection->AddServiceProvider(this); |
return true; |
} |
+ // InterfaceProvider<ViewManagerClient> |
+ virtual void BindToRequest( |
+ ApplicationConnection* connection, |
+ InterfaceRequest<ViewManagerClient> request) OVERRIDE { |
+ mojo::BindToRequest(new TestViewManagerClientConnection, &request); |
+ } |
+ |
private: |
ScopedVector<ApplicationImpl> apps_; |