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

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

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/mojo_main.cc ('k') | shell/android/native_viewport_application_loader.cc » ('j') | 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 #ifndef MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_
6 #define MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_
7
8 #include "mojo/application_manager/application_loader.h"
9 #include "mojo/public/cpp/application/application_delegate.h"
10 #include "mojo/public/cpp/application/interface_factory.h"
11 #include "mojo/services/gpu/public/interfaces/gpu.mojom.h"
12 #include "mojo/services/native_viewport/public/interfaces/native_viewport.mojom. h"
13 #include "services/gles2/gpu_impl.h"
14
15 namespace mojo {
16
17 class ApplicationImpl;
18
19 namespace shell {
20
21 class NativeViewportApplicationLoader : public ApplicationLoader,
22 public ApplicationDelegate,
23 public InterfaceFactory<NativeViewport>,
24 public InterfaceFactory<Gpu> {
25 public:
26 NativeViewportApplicationLoader();
27 ~NativeViewportApplicationLoader();
28
29 private:
30 // ApplicationLoader implementation.
31 void Load(ApplicationManager* manager,
32 const GURL& url,
33 ScopedMessagePipeHandle shell_handle,
34 LoadCallback callback) override;
35
36 void OnApplicationError(ApplicationManager* manager,
37 const GURL& url) override;
38
39 // ApplicationDelegate implementation.
40 bool ConfigureIncomingConnection(
41 mojo::ApplicationConnection* connection) override;
42
43 // InterfaceFactory<NativeViewport> implementation.
44 void Create(ApplicationConnection* connection,
45 InterfaceRequest<NativeViewport> request) override;
46
47 // InterfaceFactory<Gpu> implementation.
48 void Create(ApplicationConnection* connection,
49 InterfaceRequest<Gpu> request) override;
50
51 scoped_refptr<gles2::GpuImpl::State> gpu_state_;
52 scoped_ptr<ApplicationImpl> app_;
53
54 DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader);
55 };
56
57 } // namespace shell
58 } // namespace mojo
59
60 #endif // MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_
OLDNEW
« no previous file with comments | « shell/android/mojo_main.cc ('k') | shell/android/native_viewport_application_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698