X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fmojo%2Fservices%2Fnative_viewport%2Fnative_viewport_impl.h;h=5043da03608a42544cfa90017c048bdae610fd90;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=5d26da582511aa7fa315ca3e8de507619a2016bb;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/mojo/services/native_viewport/native_viewport_impl.h b/src/mojo/services/native_viewport/native_viewport_impl.h index 5d26da5..5043da0 100644 --- a/src/mojo/services/native_viewport/native_viewport_impl.h +++ b/src/mojo/services/native_viewport/native_viewport_impl.h @@ -6,30 +6,34 @@ #define MOJO_SERVICES_NATIVE_VIEWPORT_IMPL_H_ #include "base/memory/weak_ptr.h" -#include "mojo/services/gles2/command_buffer_impl.h" +#include "cc/surfaces/surface_id.h" #include "mojo/services/native_viewport/platform_viewport.h" +#include "mojo/services/public/interfaces/gpu/gpu.mojom.h" #include "mojo/services/public/interfaces/native_viewport/native_viewport.mojom.h" +#include "mojo/services/public/interfaces/surfaces/surfaces_service.mojom.h" +#include "ui/gfx/geometry/rect.h" namespace ui { class Event; } namespace mojo { +class ApplicationImpl; +class ViewportSurface; class NativeViewportImpl : public InterfaceImpl, public PlatformViewport::Delegate { public: - NativeViewportImpl(); + NativeViewportImpl(ApplicationImpl* app, bool is_headless); virtual ~NativeViewportImpl(); // InterfaceImpl implementation. - virtual void Create(RectPtr bounds) OVERRIDE; + virtual void Create(SizePtr bounds) OVERRIDE; virtual void Show() OVERRIDE; virtual void Hide() OVERRIDE; virtual void Close() OVERRIDE; - virtual void SetBounds(RectPtr bounds) OVERRIDE; - virtual void CreateGLES2Context( - InterfaceRequest command_buffer_request) OVERRIDE; + virtual void SetBounds(SizePtr bounds) OVERRIDE; + virtual void SubmittedFrame(SurfaceIdPtr surface_id) OVERRIDE; // PlatformViewport::Delegate implementation. virtual void OnBoundsChanged(const gfx::Rect& bounds) OVERRIDE; @@ -39,17 +43,20 @@ class NativeViewportImpl : public InterfaceImpl, virtual void OnDestroyed() OVERRIDE; void AckEvent(); - void CreateCommandBufferIfNeeded(); private: - void AckDestroyed(); - - gfx::AcceleratedWidget widget_; + bool is_headless_; scoped_ptr platform_viewport_; - InterfaceRequest command_buffer_request_; - scoped_ptr command_buffer_; + scoped_ptr viewport_surface_; + uint64_t widget_id_; + gfx::Rect bounds_; + GpuPtr gpu_service_; + SurfacesServicePtr surfaces_service_; + cc::SurfaceId child_surface_id_; bool waiting_for_event_ack_; base::WeakPtrFactory weak_factory_; + + DISALLOW_COPY_AND_ASSIGN(NativeViewportImpl); }; } // namespace mojo