Index: shell/android/native_viewport_application_loader.cc |
diff --git a/shell/android/native_viewport_application_loader.cc b/shell/android/native_viewport_application_loader.cc |
index ea9bc9bef7046c399ca2709fd2a2175e921df9ed..359f004383f0a6f38805c3b023ad4b9d968af060 100644 |
--- a/shell/android/native_viewport_application_loader.cc |
+++ b/shell/android/native_viewport_application_loader.cc |
@@ -29,26 +29,22 @@ void NativeViewportApplicationLoader::Load( |
bool NativeViewportApplicationLoader::ConfigureIncomingConnection( |
ApplicationConnection* connection) { |
- connection->AddService<mojo::NativeViewport>(this); |
- connection->AddService<mojo::Gpu>(this); |
+ connection->GetServiceProviderImpl().AddService<mojo::NativeViewport>( |
+ [this](const ConnectionContext& connection_context, |
+ InterfaceRequest<mojo::NativeViewport> native_viewport_request) { |
+ if (!gpu_state_) |
+ gpu_state_ = new gles2::GpuState(); |
+ new native_viewport::NativeViewportImpl(app_.get(), false, gpu_state_, |
+ native_viewport_request.Pass()); |
+ }); |
+ connection->GetServiceProviderImpl().AddService<mojo::Gpu>( |
+ [this](const ConnectionContext& connection_context, |
+ InterfaceRequest<mojo::Gpu> gpu_request) { |
+ if (!gpu_state_) |
+ gpu_state_ = new gles2::GpuState(); |
+ new gles2::GpuImpl(gpu_request.Pass(), gpu_state_); |
+ }); |
return true; |
} |
-void NativeViewportApplicationLoader::Create( |
- const ConnectionContext& connection_context, |
- InterfaceRequest<mojo::NativeViewport> request) { |
- if (!gpu_state_) |
- gpu_state_ = new gles2::GpuState; |
- new native_viewport::NativeViewportImpl(app_.get(), false, gpu_state_, |
- request.Pass()); |
-} |
- |
-void NativeViewportApplicationLoader::Create( |
- const ConnectionContext& connection_context, |
- InterfaceRequest<mojo::Gpu> request) { |
- if (!gpu_state_) |
- gpu_state_ = new gles2::GpuState; |
- new gles2::GpuImpl(request.Pass(), gpu_state_); |
-} |
- |
} // namespace shell |