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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 2372873003: Move synthetic gesture input to be aligned with BeginFrame. (Closed)
Patch Set: Fix unittests Created 4 years, 3 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.h
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 190d5c9f8e1b71677811395019d9762d6fd7e1ee..c465b46e2fcb7cabee1d675bae2c63061fc72906 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -162,6 +162,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
void EndFrameSubscription() override;
bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
gfx::Rect GetBoundsInRootWindow() override;
+ void OnSetNeedsFlushInput() override;
void WheelEventAck(const blink::WebMouseWheelEvent& event,
InputEventAckState ack_result) override;
void GestureEventAck(const blink::WebGestureEvent& event,
@@ -532,6 +533,9 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
// Forwards a mouse event to this view's parent window delegate.
void ForwardMouseEventToParent(ui::MouseEvent* event);
+ // Adds/Removes frame observer based on state.
+ void UpdateNeedsBeginFramesInternal();
+
// Returns the RenderViewHostDelegateView instance for this view. Returns
// NULL on failure.
RenderViewHostDelegateView* GetRenderViewHostDelegateView();
@@ -592,8 +596,16 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
// The begin frame source being observed. Null if none.
cc::BeginFrameSource* begin_frame_source_;
cc::BeginFrameArgs last_begin_frame_args_;
+
+ // Whether a request for begin frames has been issued.
bool needs_begin_frames_;
+ // Whether a request to flush input has been issued.
+ bool needs_flush_input_;
+
+ // Whether we have added ourselves as a frame observer or not.
+ bool added_frame_observer_;
+
// Used to record the last position of the mouse.
// While the mouse is locked, they store the last known position just as mouse
// lock was entered.
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698