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

Unified Diff: shell/android/native_viewport_application_loader.cc

Issue 1980763002: ApplicationConnection devolution, part 2.3. (Closed) Base URL: https://github.com/domokit/mojo.git@work794_app_conn_devo_2.2
Patch Set: Created 4 years, 7 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: 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
« no previous file with comments | « shell/android/native_viewport_application_loader.h ('k') | shell/application_manager/application_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698