X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcontent%2Fbrowser%2Frenderer_host%2Frender_widget_host_view_aura.h;h=0e01067735ead8f145d98e4b1beed3fa50f98728;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=bbade6939561556aa8bb41093e156bd3eba1fa6e;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/content/browser/renderer_host/render_widget_host_view_aura.h b/src/content/browser/renderer_host/render_widget_host_view_aura.h index bbade69..0e01067 100644 --- a/src/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/src/content/browser/renderer_host/render_widget_host_view_aura.h @@ -37,6 +37,7 @@ #include "ui/base/ime/text_input_client.h" #include "ui/compositor/compositor.h" #include "ui/compositor/compositor_observer.h" +#include "ui/compositor/compositor_vsync_manager.h" #include "ui/gfx/display_observer.h" #include "ui/gfx/rect.h" #include "webkit/common/cursors/webcursor.h" @@ -59,13 +60,23 @@ class Canvas; class Display; } +namespace gpu { +struct Mailbox; +} + namespace ui { class CompositorLock; +class CompositorVSyncManager; class InputMethod; +class LocatedEvent; class Texture; } namespace content { +#if defined(OS_WIN) +class LegacyRenderWidgetHostHWND; +#endif + class RenderWidgetHostImpl; class RenderWidgetHostView; class ResizeLock; @@ -74,6 +85,7 @@ class ResizeLock; class CONTENT_EXPORT RenderWidgetHostViewAura : public RenderWidgetHostViewBase, public ui::CompositorObserver, + public ui::CompositorVSyncManager::Observer, public ui::TextInputClient, public gfx::DisplayObserver, public aura::RootWindowObserver, @@ -89,29 +101,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAura public base::SupportsWeakPtr, public cc::DelegatedFrameResourceCollectionClient { public: - // Used to notify whenever the paint-content of the view changes. - class PaintObserver { - public: - PaintObserver() {} - virtual ~PaintObserver() {} - - // This is called when painting of the page is completed. - virtual void OnPaintComplete() = 0; - - // This is called when compositor painting of the page is completed. - virtual void OnCompositingComplete() = 0; - - // This is called when the contents for compositor painting changes. - virtual void OnUpdateCompositorContent() = 0; - - // This is called loading the page has completed. - virtual void OnPageLoadComplete() = 0; - - // This is called when the view is destroyed, so that the observer can - // perform any necessary clean-up. - virtual void OnViewDestroyed() = 0; - }; - // Displays and controls touch editing elements such as selection handles. class TouchEditingClient { public: @@ -146,10 +135,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAura virtual ~TouchEditingClient() {} }; - void set_paint_observer(PaintObserver* observer) { - paint_observer_ = observer; - } - void set_touch_editing_client(TouchEditingClient* client) { touch_editing_client_ = client; } @@ -236,7 +221,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE; virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; - virtual void GestureEventAck(int gesture_event_type, + virtual void GestureEventAck(const blink::WebGestureEvent& event, InputEventAckState ack_result) OVERRIDE; virtual void ProcessAckedTouchEvent( const TouchEventWithLatencyInfo& touch, @@ -362,7 +347,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura // Method to indicate if this instance is shutting down or closing. // TODO(shrikant): Discuss around to see if it makes sense to add this method // as part of RenderWidgetHostView. - bool IsClosing() const { return in_shutdown_; }; + bool IsClosing() const { return in_shutdown_; } protected: friend class RenderWidgetHostView; @@ -394,8 +379,9 @@ class CONTENT_EXPORT RenderWidgetHostViewAura virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE; virtual void OnCompositingLockStateChanged( ui::Compositor* compositor) OVERRIDE; - virtual void OnUpdateVSyncParameters(ui::Compositor* compositor, - base::TimeTicks timebase, + + // Overridden from ui::CompositorVSyncManager::Observer + virtual void OnUpdateVSyncParameters(base::TimeTicks timebase, base::TimeDelta interval) OVERRIDE; private: @@ -505,6 +491,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura scoped_ptr result); static void PrepareBitmapCopyOutputResult( const gfx::Size& dst_size_in_pixel, + const SkBitmap::Config config, const base::Callback& callback, scoped_ptr result); static void CopyFromCompositingSurfaceHasResultForVideo( @@ -529,8 +516,9 @@ class CONTENT_EXPORT RenderWidgetHostViewAura // Detaches |this| from the input method object. void DetachFromInputMethod(); - // Dismisses a Web Popup on mouse press outside the popup and its parent. - void ApplyEventFilterForPopupExit(ui::MouseEvent* event); + // Dismisses a Web Popup on a mouse or touch press outside the popup and its + // parent. + void ApplyEventFilterForPopupExit(ui::LocatedEvent* event); // Converts |rect| from window coordinate to screen coordinate. gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const; @@ -546,14 +534,14 @@ class CONTENT_EXPORT RenderWidgetHostViewAura void BuffersSwapped(const gfx::Size& surface_size, const gfx::Rect& damage_rect, float surface_scale_factor, - const std::string& mailbox_name, + const gpu::Mailbox& mailbox, const std::vector& latency_info, const BufferPresentedCallback& ack_callback); bool SwapBuffersPrepare(const gfx::Rect& surface_rect, float surface_scale_factor, const gfx::Rect& damage_rect, - const std::string& mailbox_name, + const gpu::Mailbox& mailbox, const BufferPresentedCallback& ack_callback); void SwapBuffersCompleted( @@ -588,12 +576,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAura // Helper function to set keyboard focus to the main window. void SetKeyboardFocus(); -#if defined(OS_WIN) - // Updates the total list of cutout rects, which is the union of transient - // windows and constrained windows. - void UpdateCutoutRects(); -#endif - // The model object. RenderWidgetHostImpl* host_; @@ -663,6 +645,9 @@ class CONTENT_EXPORT RenderWidgetHostViewAura // This holds the current software framebuffer, if any. scoped_ptr software_frame_manager_; + // The vsync manager we are observing for changes, if any. + scoped_refptr vsync_manager_; + // With delegated renderer, this is the last output surface, used to // disambiguate resources with the same id coming from different output // surfaces. @@ -757,11 +742,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAura }; CursorVisibilityState cursor_visibility_state_in_renderer_; - // An observer to notify that the paint content of the view has changed. The - // observer is not owned by the view, and must remove itself as an oberver - // when it is being destroyed. - PaintObserver* paint_observer_; - #if defined(OS_WIN) // The list of rectangles from constrained windows over this view. Windowed // NPAPI plugins shouldn't draw over them. @@ -804,10 +784,12 @@ class CONTENT_EXPORT RenderWidgetHostViewAura base::WeakPtrFactory weak_ptr_factory_; #if defined(OS_WIN) - // The dummy HWND which corresponds to the bounds of the web page. This is - // passed to windowless plugins like Flash/Silverlight, etc as the - // container window. - HWND plugin_parent_window_; + // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used + // for accessibility, as the container for windowless plugins like + // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, + // etc. + scoped_ptr + legacy_render_widget_host_HWND_; #endif DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); };