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

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

Issue 1074963002: Add some |using mojo::...;|s to //shell .cc files. (Closed) Base URL: https://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 | « no previous file | shell/application_manager/application_manager.cc » ('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"
11 11
12 using mojo::ApplicationConnection;
13 using mojo::InterfaceRequest;
14
12 namespace shell { 15 namespace shell {
13 16
14 NativeViewportApplicationLoader::NativeViewportApplicationLoader() { 17 NativeViewportApplicationLoader::NativeViewportApplicationLoader() {
15 } 18 }
16 19
17 NativeViewportApplicationLoader::~NativeViewportApplicationLoader() { 20 NativeViewportApplicationLoader::~NativeViewportApplicationLoader() {
18 } 21 }
19 22
20 void NativeViewportApplicationLoader::Load( 23 void NativeViewportApplicationLoader::Load(
21 const GURL& url, 24 const GURL& url,
22 mojo::InterfaceRequest<mojo::Application> application_request) { 25 InterfaceRequest<mojo::Application> application_request) {
23 DCHECK(application_request.is_pending()); 26 DCHECK(application_request.is_pending());
24 app_.reset(new mojo::ApplicationImpl(this, application_request.Pass())); 27 app_.reset(new mojo::ApplicationImpl(this, application_request.Pass()));
25 } 28 }
26 29
27 bool NativeViewportApplicationLoader::ConfigureIncomingConnection( 30 bool NativeViewportApplicationLoader::ConfigureIncomingConnection(
28 mojo::ApplicationConnection* connection) { 31 ApplicationConnection* connection) {
29 connection->AddService<mojo::NativeViewport>(this); 32 connection->AddService<mojo::NativeViewport>(this);
30 connection->AddService<mojo::Gpu>(this); 33 connection->AddService<mojo::Gpu>(this);
31 connection->AddService<mojo::Keyboard>(this); 34 connection->AddService<mojo::Keyboard>(this);
32 return true; 35 return true;
33 } 36 }
34 37
35 void NativeViewportApplicationLoader::Create( 38 void NativeViewportApplicationLoader::Create(
36 mojo::ApplicationConnection* connection, 39 ApplicationConnection* connection,
37 mojo::InterfaceRequest<mojo::NativeViewport> request) { 40 InterfaceRequest<mojo::NativeViewport> request) {
38 if (!gpu_state_) 41 if (!gpu_state_)
39 gpu_state_ = new gles2::GpuState; 42 gpu_state_ = new gles2::GpuState;
40 new native_viewport::NativeViewportImpl(false, gpu_state_, request.Pass()); 43 new native_viewport::NativeViewportImpl(false, gpu_state_, request.Pass());
41 } 44 }
42 45
43 void NativeViewportApplicationLoader::Create( 46 void NativeViewportApplicationLoader::Create(
44 mojo::ApplicationConnection* connection, 47 ApplicationConnection* connection,
45 mojo::InterfaceRequest<mojo::Keyboard> request) { 48 InterfaceRequest<mojo::Keyboard> request) {
46 new KeyboardImpl(request.Pass()); 49 new KeyboardImpl(request.Pass());
47 } 50 }
48 51
49 void NativeViewportApplicationLoader::Create( 52 void NativeViewportApplicationLoader::Create(
50 mojo::ApplicationConnection* connection, 53 ApplicationConnection* connection,
51 mojo::InterfaceRequest<mojo::Gpu> request) { 54 InterfaceRequest<mojo::Gpu> request) {
52 if (!gpu_state_) 55 if (!gpu_state_)
53 gpu_state_ = new gles2::GpuState; 56 gpu_state_ = new gles2::GpuState;
54 new gles2::GpuImpl(request.Pass(), gpu_state_); 57 new gles2::GpuImpl(request.Pass(), gpu_state_);
55 } 58 }
56 59
57 } // namespace shell 60 } // namespace shell
OLDNEW
« no previous file with comments | « no previous file | shell/application_manager/application_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698