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

Side by Side Diff: shell/android/native_viewport_application_loader.cc

Issue 2011053003: Make PlatformViewport and NativeViewportImpl use Shell* instead of ApplicationImpl*. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix android 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 unified diff | Download patch
« no previous file with comments | « services/native_viewport/platform_viewport_x11.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "shell/android/native_viewport_application_loader.h" 5 #include "shell/android/native_viewport_application_loader.h"
6 6
7 #include "mojo/public/cpp/application/application_impl.h" 7 #include "mojo/public/cpp/application/application_impl.h"
8 #include "services/gles2/gpu_state.h" 8 #include "services/gles2/gpu_state.h"
9 #include "services/native_viewport/native_viewport_impl.h" 9 #include "services/native_viewport/native_viewport_impl.h"
10 10
(...skipping 15 matching lines...) Expand all
26 app_.reset(new mojo::ApplicationImpl(this, application_request.Pass())); 26 app_.reset(new mojo::ApplicationImpl(this, application_request.Pass()));
27 } 27 }
28 28
29 bool NativeViewportApplicationLoader::ConfigureIncomingConnection( 29 bool NativeViewportApplicationLoader::ConfigureIncomingConnection(
30 mojo::ServiceProviderImpl* service_provider_impl) { 30 mojo::ServiceProviderImpl* service_provider_impl) {
31 service_provider_impl->AddService<mojo::NativeViewport>( 31 service_provider_impl->AddService<mojo::NativeViewport>(
32 [this](const ConnectionContext& connection_context, 32 [this](const ConnectionContext& connection_context,
33 InterfaceRequest<mojo::NativeViewport> native_viewport_request) { 33 InterfaceRequest<mojo::NativeViewport> native_viewport_request) {
34 if (!gpu_state_) 34 if (!gpu_state_)
35 gpu_state_ = new gles2::GpuState(); 35 gpu_state_ = new gles2::GpuState();
36 new native_viewport::NativeViewportImpl(app_.get(), false, gpu_state_, 36 new native_viewport::NativeViewportImpl(
37 native_viewport_request.Pass()); 37 app_->shell(), false, gpu_state_, native_viewport_request.Pass());
38 }); 38 });
39 service_provider_impl->AddService<mojo::Gpu>( 39 service_provider_impl->AddService<mojo::Gpu>(
40 [this](const ConnectionContext& connection_context, 40 [this](const ConnectionContext& connection_context,
41 InterfaceRequest<mojo::Gpu> gpu_request) { 41 InterfaceRequest<mojo::Gpu> gpu_request) {
42 if (!gpu_state_) 42 if (!gpu_state_)
43 gpu_state_ = new gles2::GpuState(); 43 gpu_state_ = new gles2::GpuState();
44 new gles2::GpuImpl(gpu_request.Pass(), gpu_state_); 44 new gles2::GpuImpl(gpu_request.Pass(), gpu_state_);
45 }); 45 });
46 return true; 46 return true;
47 } 47 }
48 48
49 } // namespace shell 49 } // namespace shell
OLDNEW
« no previous file with comments | « services/native_viewport/platform_viewport_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698