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

Side by Side Diff: mojo/runner/android/native_viewport_application_loader.cc

Issue 1139673003: Make Mandoline shut down cleanly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 | « mojo/application/app_lifetime_helper.cc ('k') | mojo/services/network/cookie_store_impl.h » ('j') | 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 "mojo/runner/android/native_viewport_application_loader.h" 5 #include "mojo/runner/android/native_viewport_application_loader.h"
6 6
7 #include "components/gles2/gpu_state.h" 7 #include "components/gles2/gpu_state.h"
8 #include "components/native_viewport/native_viewport_impl.h" 8 #include "components/native_viewport/native_viewport_impl.h"
9 #include "mojo/application/public/cpp/application_impl.h" 9 #include "mojo/application/public/cpp/application_impl.h"
10 10
(...skipping 18 matching lines...) Expand all
29 connection->AddService<NativeViewport>(this); 29 connection->AddService<NativeViewport>(this);
30 connection->AddService<Gpu>(this); 30 connection->AddService<Gpu>(this);
31 return true; 31 return true;
32 } 32 }
33 33
34 void NativeViewportApplicationLoader::Create( 34 void NativeViewportApplicationLoader::Create(
35 ApplicationConnection* connection, 35 ApplicationConnection* connection,
36 InterfaceRequest<NativeViewport> request) { 36 InterfaceRequest<NativeViewport> request) {
37 if (!gpu_state_) 37 if (!gpu_state_)
38 gpu_state_ = new gles2::GpuState; 38 gpu_state_ = new gles2::GpuState;
39 new native_viewport::NativeViewportImpl(false, gpu_state_, request.Pass()); 39 // Pass a null AppRefCount because on Android the NativeViewPort app must
40 // live on the main thread and we don't want to exit that when all the native
41 // viewports are gone.
42 new native_viewport::NativeViewportImpl(
43 false, gpu_state_, request.Pass(),
44 make_scoped_ptr<mojo::AppRefCount>(nullptr));
40 } 45 }
41 46
42 void NativeViewportApplicationLoader::Create(ApplicationConnection* connection, 47 void NativeViewportApplicationLoader::Create(ApplicationConnection* connection,
43 InterfaceRequest<Gpu> request) { 48 InterfaceRequest<Gpu> request) {
44 if (!gpu_state_) 49 if (!gpu_state_)
45 gpu_state_ = new gles2::GpuState; 50 gpu_state_ = new gles2::GpuState;
46 new gles2::GpuImpl(request.Pass(), gpu_state_); 51 new gles2::GpuImpl(request.Pass(), gpu_state_);
47 } 52 }
48 53
49 } // namespace runner 54 } // namespace runner
50 } // namespace mojo 55 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/application/app_lifetime_helper.cc ('k') | mojo/services/network/cookie_store_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698