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

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

Issue 878933005: Remove NativeViewportClient (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
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/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
(...skipping 24 matching lines...) Expand all
35 mojo::ApplicationConnection* connection) { 35 mojo::ApplicationConnection* connection) {
36 connection->AddService<NativeViewport>(this); 36 connection->AddService<NativeViewport>(this);
37 connection->AddService<Gpu>(this); 37 connection->AddService<Gpu>(this);
38 connection->AddService<Keyboard>(this); 38 connection->AddService<Keyboard>(this);
39 return true; 39 return true;
40 } 40 }
41 41
42 void NativeViewportApplicationLoader::Create( 42 void NativeViewportApplicationLoader::Create(
43 ApplicationConnection* connection, 43 ApplicationConnection* connection,
44 InterfaceRequest<NativeViewport> request) { 44 InterfaceRequest<NativeViewport> request) {
45 BindToRequest(new native_viewport::NativeViewportImpl(app_.get(), false), 45 new native_viewport::NativeViewportImpl(app_.get(), false, request.Pass());
46 &request);
47 } 46 }
48 47
49 void NativeViewportApplicationLoader::Create( 48 void NativeViewportApplicationLoader::Create(
50 ApplicationConnection* connection, 49 ApplicationConnection* connection,
51 InterfaceRequest<Keyboard> request) { 50 InterfaceRequest<Keyboard> request) {
52 new KeyboardImpl(request.Pass()); 51 new KeyboardImpl(request.Pass());
53 } 52 }
54 53
55 void NativeViewportApplicationLoader::Create(ApplicationConnection* connection, 54 void NativeViewportApplicationLoader::Create(ApplicationConnection* connection,
56 InterfaceRequest<Gpu> request) { 55 InterfaceRequest<Gpu> request) {
57 if (!gpu_state_) 56 if (!gpu_state_)
58 gpu_state_ = new gles2::GpuImpl::State; 57 gpu_state_ = new gles2::GpuImpl::State;
59 new gles2::GpuImpl(request.Pass(), gpu_state_); 58 new gles2::GpuImpl(request.Pass(), gpu_state_);
60 } 59 }
61 60
62 } // namespace shell 61 } // namespace shell
63 } // namespace mojo 62 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698