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

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

Issue 1280613003: Allow native_viewport to create new native windows on demand on Android. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 4 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 | « shell/android/apk/src/org/chromium/mojo/shell/ViewportActivity.java ('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 20 matching lines...) Expand all
31 connection->AddService<mojo::NativeViewport>(this); 31 connection->AddService<mojo::NativeViewport>(this);
32 connection->AddService<mojo::Gpu>(this); 32 connection->AddService<mojo::Gpu>(this);
33 return true; 33 return true;
34 } 34 }
35 35
36 void NativeViewportApplicationLoader::Create( 36 void NativeViewportApplicationLoader::Create(
37 ApplicationConnection* connection, 37 ApplicationConnection* connection,
38 InterfaceRequest<mojo::NativeViewport> request) { 38 InterfaceRequest<mojo::NativeViewport> request) {
39 if (!gpu_state_) 39 if (!gpu_state_)
40 gpu_state_ = new gles2::GpuState; 40 gpu_state_ = new gles2::GpuState;
41 new native_viewport::NativeViewportImpl(false, gpu_state_, request.Pass()); 41 new native_viewport::NativeViewportImpl(app_.get(), false, gpu_state_,
42 request.Pass());
42 } 43 }
43 44
44 void NativeViewportApplicationLoader::Create( 45 void NativeViewportApplicationLoader::Create(
45 ApplicationConnection* connection, 46 ApplicationConnection* connection,
46 InterfaceRequest<mojo::Gpu> request) { 47 InterfaceRequest<mojo::Gpu> request) {
47 if (!gpu_state_) 48 if (!gpu_state_)
48 gpu_state_ = new gles2::GpuState; 49 gpu_state_ = new gles2::GpuState;
49 new gles2::GpuImpl(request.Pass(), gpu_state_); 50 new gles2::GpuImpl(request.Pass(), gpu_state_);
50 } 51 }
51 52
52 } // namespace shell 53 } // namespace shell
OLDNEW
« no previous file with comments | « shell/android/apk/src/org/chromium/mojo/shell/ViewportActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698