OLD | NEW |
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 Loading... |
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 |
OLD | NEW |