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

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

Issue 1088793003: Expose sky KeyboardService in android mojo_shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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/native_viewport_application_loader.h ('k') | sky/apk/demo/BUILD.gn » ('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 "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 #include "shell/android/keyboard_impl.h" 10 #include "shell/android/keyboard_impl.h"
(...skipping 13 matching lines...) Expand all
24 const GURL& url, 24 const GURL& url,
25 InterfaceRequest<mojo::Application> application_request) { 25 InterfaceRequest<mojo::Application> application_request) {
26 DCHECK(application_request.is_pending()); 26 DCHECK(application_request.is_pending());
27 app_.reset(new mojo::ApplicationImpl(this, application_request.Pass())); 27 app_.reset(new mojo::ApplicationImpl(this, application_request.Pass()));
28 } 28 }
29 29
30 bool NativeViewportApplicationLoader::ConfigureIncomingConnection( 30 bool NativeViewportApplicationLoader::ConfigureIncomingConnection(
31 ApplicationConnection* connection) { 31 ApplicationConnection* connection) {
32 connection->AddService<mojo::NativeViewport>(this); 32 connection->AddService<mojo::NativeViewport>(this);
33 connection->AddService<mojo::Gpu>(this); 33 connection->AddService<mojo::Gpu>(this);
34 connection->AddService<mojo::Keyboard>(this); 34 connection->AddService<keyboard::KeyboardService>(this);
35 return true; 35 return true;
36 } 36 }
37 37
38 void NativeViewportApplicationLoader::Create( 38 void NativeViewportApplicationLoader::Create(
39 ApplicationConnection* connection, 39 ApplicationConnection* connection,
40 InterfaceRequest<mojo::NativeViewport> request) { 40 InterfaceRequest<mojo::NativeViewport> request) {
41 if (!gpu_state_) 41 if (!gpu_state_)
42 gpu_state_ = new gles2::GpuState; 42 gpu_state_ = new gles2::GpuState;
43 new native_viewport::NativeViewportImpl(false, gpu_state_, request.Pass()); 43 new native_viewport::NativeViewportImpl(false, gpu_state_, request.Pass());
44 } 44 }
45 45
46 void NativeViewportApplicationLoader::Create( 46 void NativeViewportApplicationLoader::Create(
47 ApplicationConnection* connection, 47 ApplicationConnection* connection,
48 InterfaceRequest<mojo::Keyboard> request) { 48 InterfaceRequest<keyboard::KeyboardService> request) {
49 new KeyboardImpl(request.Pass()); 49 KeyboardImpl::CreateKeyboardImpl(request.Pass());
50 } 50 }
51 51
52 void NativeViewportApplicationLoader::Create( 52 void NativeViewportApplicationLoader::Create(
53 ApplicationConnection* connection, 53 ApplicationConnection* connection,
54 InterfaceRequest<mojo::Gpu> request) { 54 InterfaceRequest<mojo::Gpu> request) {
55 if (!gpu_state_) 55 if (!gpu_state_)
56 gpu_state_ = new gles2::GpuState; 56 gpu_state_ = new gles2::GpuState;
57 new gles2::GpuImpl(request.Pass(), gpu_state_); 57 new gles2::GpuImpl(request.Pass(), gpu_state_);
58 } 58 }
59 59
60 } // namespace shell 60 } // namespace shell
OLDNEW
« no previous file with comments | « shell/android/native_viewport_application_loader.h ('k') | sky/apk/demo/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698