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

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

Issue 1091513005: Separate mojo/shell into a runner and the application manager (shell) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "mojo/shell/android/native_viewport_application_loader.h"
6
7 #include "components/gles2/gpu_state.h"
8 #include "components/native_viewport/native_viewport_impl.h"
9 #include "mojo/public/cpp/application/application_impl.h"
10
11 namespace mojo {
12 namespace shell {
13
14 NativeViewportApplicationLoader::NativeViewportApplicationLoader() {
15 }
16
17 NativeViewportApplicationLoader::~NativeViewportApplicationLoader() {
18 }
19
20 void NativeViewportApplicationLoader::Load(
21 const GURL& url,
22 InterfaceRequest<Application> application_request) {
23 DCHECK(application_request.is_pending());
24 app_.reset(new ApplicationImpl(this, application_request.Pass()));
25 }
26
27 bool NativeViewportApplicationLoader::ConfigureIncomingConnection(
28 ApplicationConnection* connection) {
29 connection->AddService<NativeViewport>(this);
30 connection->AddService<Gpu>(this);
31 return true;
32 }
33
34 void NativeViewportApplicationLoader::Create(
35 ApplicationConnection* connection,
36 InterfaceRequest<NativeViewport> request) {
37 if (!gpu_state_)
38 gpu_state_ = new gles2::GpuState;
39 new native_viewport::NativeViewportImpl(false, gpu_state_, request.Pass());
40 }
41
42 void NativeViewportApplicationLoader::Create(ApplicationConnection* connection,
43 InterfaceRequest<Gpu> request) {
44 if (!gpu_state_)
45 gpu_state_ = new gles2::GpuState;
46 new gles2::GpuImpl(request.Pass(), gpu_state_);
47 }
48
49 } // namespace shell
50 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/android/native_viewport_application_loader.h ('k') | mojo/shell/android/run_android_application_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698