OLD | NEW |
(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/public/cpp/application/application_delegate.h" |
| 9 #include "mojo/public/cpp/application/interface_factory.h" |
| 10 #include "mojo/services/gles2/gpu_impl.h" |
| 11 #include "mojo/services/keyboard/public/interfaces/keyboard.mojom.h" |
| 12 #include "mojo/shell/application_manager/application_loader.h" |
| 13 #include "third_party/mojo_services/src/gpu/public/interfaces/gpu.mojom.h" |
| 14 #include "third_party/mojo_services/src/native_viewport/public/interfaces/native
_viewport.mojom.h" |
| 15 |
| 16 namespace gles2 { |
| 17 class GpuState; |
| 18 } |
| 19 |
| 20 namespace mojo { |
| 21 |
| 22 class ApplicationImpl; |
| 23 |
| 24 namespace shell { |
| 25 |
| 26 class NativeViewportApplicationLoader : public ApplicationLoader, |
| 27 public ApplicationDelegate, |
| 28 public InterfaceFactory<Keyboard>, |
| 29 public InterfaceFactory<NativeViewport>, |
| 30 public InterfaceFactory<Gpu> { |
| 31 public: |
| 32 NativeViewportApplicationLoader(); |
| 33 ~NativeViewportApplicationLoader(); |
| 34 |
| 35 private: |
| 36 // ApplicationLoader implementation. |
| 37 void Load(const GURL& url, |
| 38 InterfaceRequest<Application> application_request) override; |
| 39 |
| 40 // ApplicationDelegate implementation. |
| 41 bool ConfigureIncomingConnection(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 // InterfaceFactory<Keyboard> implementation. |
| 52 void Create(ApplicationConnection* connection, |
| 53 InterfaceRequest<Keyboard> request) override; |
| 54 |
| 55 scoped_refptr<gles2::GpuState> gpu_state_; |
| 56 scoped_ptr<ApplicationImpl> app_; |
| 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader); |
| 59 }; |
| 60 |
| 61 } // namespace shell |
| 62 } // namespace mojo |
| 63 |
| 64 #endif // MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_ |
OLD | NEW |