Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / mojo / shell / android / native_viewport_application_loader.h
blob16bc2aa6a74d3ba5b089010f359867be2c3a73f2
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.
5 #ifndef MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_
6 #define MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_
8 #include "components/gles2/gpu_impl.h"
9 #include "components/gpu/public/interfaces/gpu.mojom.h"
10 #include "components/native_viewport/public/interfaces/native_viewport.mojom.h"
11 #include "mojo/public/cpp/application/application_delegate.h"
12 #include "mojo/public/cpp/application/interface_factory.h"
13 #include "mojo/shell/application_manager/application_loader.h"
15 namespace gles2 {
16 class GpuState;
19 namespace mojo {
21 class ApplicationImpl;
23 namespace shell {
25 class NativeViewportApplicationLoader : public ApplicationLoader,
26 public ApplicationDelegate,
27 public InterfaceFactory<NativeViewport>,
28 public InterfaceFactory<Gpu> {
29 public:
30 NativeViewportApplicationLoader();
31 ~NativeViewportApplicationLoader();
33 private:
34 // ApplicationLoader implementation.
35 void Load(const GURL& url,
36 InterfaceRequest<Application> application_request) override;
38 // ApplicationDelegate implementation.
39 bool ConfigureIncomingConnection(ApplicationConnection* connection) override;
41 // InterfaceFactory<NativeViewport> implementation.
42 void Create(ApplicationConnection* connection,
43 InterfaceRequest<NativeViewport> request) override;
45 // InterfaceFactory<Gpu> implementation.
46 void Create(ApplicationConnection* connection,
47 InterfaceRequest<Gpu> request) override;
49 scoped_refptr<gles2::GpuState> gpu_state_;
50 scoped_ptr<ApplicationImpl> app_;
52 DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader);
55 } // namespace shell
56 } // namespace mojo
58 #endif // MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_