| Index: shell/android/native_viewport_application_loader.h
|
| diff --git a/shell/android/native_viewport_application_loader.h b/shell/android/native_viewport_application_loader.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ecaca49f5833573294ac56d640df2e030b818b76
|
| --- /dev/null
|
| +++ b/shell/android/native_viewport_application_loader.h
|
| @@ -0,0 +1,60 @@
|
| +// 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/application_manager/application_loader.h"
|
| +#include "mojo/public/cpp/application/application_delegate.h"
|
| +#include "mojo/public/cpp/application/interface_factory.h"
|
| +#include "mojo/services/gpu/public/interfaces/gpu.mojom.h"
|
| +#include "mojo/services/native_viewport/public/interfaces/native_viewport.mojom.h"
|
| +#include "services/gles2/gpu_impl.h"
|
| +
|
| +namespace mojo {
|
| +
|
| +class ApplicationImpl;
|
| +
|
| +namespace shell {
|
| +
|
| +class NativeViewportApplicationLoader : public ApplicationLoader,
|
| + public ApplicationDelegate,
|
| + public InterfaceFactory<NativeViewport>,
|
| + public InterfaceFactory<Gpu> {
|
| + public:
|
| + NativeViewportApplicationLoader();
|
| + ~NativeViewportApplicationLoader();
|
| +
|
| + private:
|
| + // ApplicationLoader implementation.
|
| + void Load(ApplicationManager* manager,
|
| + const GURL& url,
|
| + ScopedMessagePipeHandle shell_handle,
|
| + LoadCallback callback) override;
|
| +
|
| + void OnApplicationError(ApplicationManager* manager,
|
| + const GURL& url) override;
|
| +
|
| + // ApplicationDelegate implementation.
|
| + bool ConfigureIncomingConnection(
|
| + mojo::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;
|
| +
|
| + scoped_refptr<gles2::GpuImpl::State> gpu_state_;
|
| + scoped_ptr<ApplicationImpl> app_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader);
|
| +};
|
| +
|
| +} // namespace shell
|
| +} // namespace mojo
|
| +
|
| +#endif // MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_
|
|
|