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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« 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