| 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/native_viewport/native_viewport_impl.h" | 8 #include "services/native_viewport/native_viewport_impl.h" |
| 9 #include "shell/android/keyboard_impl.h" | 9 #include "shell/android/keyboard_impl.h" |
| 10 | 10 |
| 11 namespace mojo { | 11 namespace mojo { |
| 12 namespace shell { | 12 namespace shell { |
| 13 | 13 |
| 14 NativeViewportApplicationLoader::NativeViewportApplicationLoader() { | 14 NativeViewportApplicationLoader::NativeViewportApplicationLoader() { |
| 15 } | 15 } |
| 16 | 16 |
| 17 NativeViewportApplicationLoader::~NativeViewportApplicationLoader() { | 17 NativeViewportApplicationLoader::~NativeViewportApplicationLoader() { |
| 18 } | 18 } |
| 19 | 19 |
| 20 void NativeViewportApplicationLoader::Load(ApplicationManager* manager, | 20 void NativeViewportApplicationLoader::Load(ApplicationManager* manager, |
| 21 const GURL& url, | 21 const GURL& url, |
| 22 ScopedMessagePipeHandle shell_handle, | 22 ShellPtr shell, |
| 23 LoadCallback callback) { | 23 LoadCallback callback) { |
| 24 DCHECK(shell_handle.is_valid()); | 24 DCHECK(shell); |
| 25 app_.reset(new ApplicationImpl(this, shell_handle.Pass())); | 25 app_.reset(new ApplicationImpl(this, shell.Pass())); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void NativeViewportApplicationLoader::OnApplicationError( | 28 void NativeViewportApplicationLoader::OnApplicationError( |
| 29 ApplicationManager* manager, | 29 ApplicationManager* manager, |
| 30 const GURL& url) { | 30 const GURL& url) { |
| 31 } | 31 } |
| 32 | 32 |
| 33 bool NativeViewportApplicationLoader::ConfigureIncomingConnection( | 33 bool NativeViewportApplicationLoader::ConfigureIncomingConnection( |
| 34 mojo::ApplicationConnection* connection) { | 34 mojo::ApplicationConnection* connection) { |
| 35 connection->AddService<NativeViewport>(this); | 35 connection->AddService<NativeViewport>(this); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 53 | 53 |
| 54 void NativeViewportApplicationLoader::Create(ApplicationConnection* connection, | 54 void NativeViewportApplicationLoader::Create(ApplicationConnection* connection, |
| 55 InterfaceRequest<Gpu> request) { | 55 InterfaceRequest<Gpu> request) { |
| 56 if (!gpu_state_) | 56 if (!gpu_state_) |
| 57 gpu_state_ = new gles2::GpuImpl::State; | 57 gpu_state_ = new gles2::GpuImpl::State; |
| 58 new gles2::GpuImpl(request.Pass(), gpu_state_); | 58 new gles2::GpuImpl(request.Pass(), gpu_state_); |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace shell | 61 } // namespace shell |
| 62 } // namespace mojo | 62 } // namespace mojo |
| OLD | NEW |