diff options
author | John Abd-El-Malek <jam@chromium.org> | 2015-04-02 10:29:35 -0700 |
---|---|---|
committer | John Abd-El-Malek <jam@chromium.org> | 2015-04-02 17:31:11 +0000 |
commit | 537a670451020f4764d511cbdf8e30ec91ef897c (patch) | |
tree | d2868da2b0d33dc7ed8c8e709ae4a7f5bd5aefd8 /mojo/shell/android/native_viewport_application_loader.h | |
parent | 83653dd1da59dfa7ddd9e48d4cd507a11cefd968 (diff) | |
download | chromium_src-537a670451020f4764d511cbdf8e30ec91ef897c.zip chromium_src-537a670451020f4764d511cbdf8e30ec91ef897c.tar.gz chromium_src-537a670451020f4764d511cbdf8e30ec91ef897c.tar.bz2 |
Get mojo_shell building inside chromium checkout.
This brings in mojo_shell and the necessary services to make html_viewer work.
This is copied from the Mojo repo at 272fbba5887d66fc0111e2ab44c1edf67b7f23e0.
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/1049993002
Cr-Commit-Position: refs/heads/master@{#323528}
Diffstat (limited to 'mojo/shell/android/native_viewport_application_loader.h')
-rw-r--r-- | mojo/shell/android/native_viewport_application_loader.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/mojo/shell/android/native_viewport_application_loader.h b/mojo/shell/android/native_viewport_application_loader.h new file mode 100644 index 0000000..ece77e1 --- /dev/null +++ b/mojo/shell/android/native_viewport_application_loader.h @@ -0,0 +1,64 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_ +#define MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_ + +#include "mojo/public/cpp/application/application_delegate.h" +#include "mojo/public/cpp/application/interface_factory.h" +#include "mojo/services/gles2/gpu_impl.h" +#include "mojo/services/keyboard/public/interfaces/keyboard.mojom.h" +#include "mojo/shell/application_manager/application_loader.h" +#include "third_party/mojo_services/src/gpu/public/interfaces/gpu.mojom.h" +#include "third_party/mojo_services/src/native_viewport/public/interfaces/native_viewport.mojom.h" + +namespace gles2 { +class GpuState; +} + +namespace mojo { + +class ApplicationImpl; + +namespace shell { + +class NativeViewportApplicationLoader : public ApplicationLoader, + public ApplicationDelegate, + public InterfaceFactory<Keyboard>, + public InterfaceFactory<NativeViewport>, + public InterfaceFactory<Gpu> { + public: + NativeViewportApplicationLoader(); + ~NativeViewportApplicationLoader(); + + private: + // ApplicationLoader implementation. + void Load(const GURL& url, + InterfaceRequest<Application> application_request) override; + + // ApplicationDelegate implementation. + bool ConfigureIncomingConnection(ApplicationConnection* connection) override; + + // InterfaceFactory<NativeViewport> implementation. + void Create(ApplicationConnection* connection, + InterfaceRequest<NativeViewport> request) override; + + // InterfaceFactory<Gpu> implementation. + void Create(ApplicationConnection* connection, + InterfaceRequest<Gpu> request) override; + + // InterfaceFactory<Keyboard> implementation. + void Create(ApplicationConnection* connection, + InterfaceRequest<Keyboard> request) override; + + scoped_refptr<gles2::GpuState> gpu_state_; + scoped_ptr<ApplicationImpl> app_; + + DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader); +}; + +} // namespace shell +} // namespace mojo + +#endif // MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_ |