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

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

Issue 810803003: Moves NativeViewportApplicationLoader into own files (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix Created 6 years 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') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "shell/android/native_viewport_application_loader.h"
6
7 #include "mojo/public/cpp/application/application_impl.h"
8 #include "services/native_viewport/native_viewport_impl.h"
9
10 namespace mojo {
11 namespace shell {
12
13 NativeViewportApplicationLoader::NativeViewportApplicationLoader()
14 : gpu_state_(new gles2::GpuImpl::State) {
15 }
16
17 NativeViewportApplicationLoader::~NativeViewportApplicationLoader() {
18 }
19
20 void NativeViewportApplicationLoader::Load(ApplicationManager* manager,
21 const GURL& url,
22 ScopedMessagePipeHandle shell_handle,
23 LoadCallback callback) {
24 DCHECK(shell_handle.is_valid());
25 app_.reset(new ApplicationImpl(this, shell_handle.Pass()));
26 }
27
28 void NativeViewportApplicationLoader::OnApplicationError(
29 ApplicationManager* manager,
30 const GURL& url) {
31 }
32
33 bool NativeViewportApplicationLoader::ConfigureIncomingConnection(
34 mojo::ApplicationConnection* connection) {
35 connection->AddService<NativeViewport>(this);
36 connection->AddService<Gpu>(this);
37 return true;
38 }
39
40 void NativeViewportApplicationLoader::Create(
41 ApplicationConnection* connection,
42 InterfaceRequest<NativeViewport> request) {
43 BindToRequest(new native_viewport::NativeViewportImpl(app_.get(), false),
44 &request);
45 }
46
47 void NativeViewportApplicationLoader::Create(
48 ApplicationConnection* connection,
49 InterfaceRequest<Gpu> request) {
50 new gles2::GpuImpl(request.Pass(), gpu_state_);
51 }
52
53 } // namespace shell
54 } // namespace mojo
OLDNEW
« no previous file with comments | « shell/android/native_viewport_application_loader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698