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

Unified Diff: shell/android/native_viewport_application_loader.h

Issue 1280613003: Allow native_viewport to create new native windows on demand on Android. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 4 months 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
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
index 4eeb4c6af28f3b5fb7efd2aff798d5315b1a3afe..db8b84da501b82294c79986b5d1f22bc7cfc2990 100644
--- a/shell/android/native_viewport_application_loader.h
+++ b/shell/android/native_viewport_application_loader.h
@@ -5,6 +5,7 @@
#ifndef MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_
#define MOJO_SHELL_ANDROID_NATIVE_VIEWPORT_APPLICATION_LOADER_H_
+#include "mojo/common/binding_set.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"
@@ -20,11 +21,17 @@ namespace mojo {
class ApplicationImpl;
} // namespace mojo
+namespace native_viewport {
+class NativeViewportImpl;
+} // namespace native_viewport
+
namespace shell {
class NativeViewportApplicationLoader
: public ApplicationLoader,
public mojo::ApplicationDelegate,
+ public mojo::NativeViewportShellService,
+ public mojo::InterfaceFactory<mojo::NativeViewportShellService>,
public mojo::InterfaceFactory<mojo::NativeViewport>,
public mojo::InterfaceFactory<mojo::Gpu> {
public:
@@ -49,8 +56,20 @@ class NativeViewportApplicationLoader
void Create(mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<mojo::Gpu> request) override;
+ // mojo::InterfaceFactory<NativeViewportShellService> implementation.
+ void Create(
+ mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<NativeViewportShellService> request) override;
+
+ // mojo::NativeViewportShellService implementation
+ void NewNativeSurfaceAvailable() override;
+
scoped_refptr<gles2::GpuState> gpu_state_;
scoped_ptr<mojo::ApplicationImpl> app_;
+ mojo::BindingSet<mojo::NativeViewportShellService>
+ native_viewport_shell_service_bindings_;
+ std::queue<base::WeakPtr<native_viewport::NativeViewportImpl>>
+ native_viewports_;
DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader);
};

Powered by Google App Engine
This is Rietveld 408576698