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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.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
Index: content/browser/renderer_host/render_widget_host_view_mac.h
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 9a2f0da14f1af1bb5717dbf56d17313d42168ccd..75ad48f87d672eb3b211f8fd0d60174aa5c91f5e 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -320,6 +320,7 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
bool LockMouse() override;
void UnlockMouse() override;
+ void OnSetNeedsFlushInput() override;
void GestureEventAck(const blink::WebGestureEvent& event,
InputEventAckState ack_result) override;
@@ -500,6 +501,9 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// Get the focused view that should be used for retrieving the text selection.
RenderWidgetHostViewBase* GetFocusedViewForTextSelection();
+ // Adds/Removes frame observer based on state.
+ void UpdateNeedsBeginFramesInternal();
+
// The associated view. This is weak and is inserted into the view hierarchy
// to own this RenderWidgetHostViewMac object. Set to nil at the start of the
// destructor.
@@ -545,6 +549,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
gfx::Range composition_range_;
std::vector<gfx::Rect> composition_bounds_;
+ // 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_;
+
// Factory used to safely scope delayed calls to ShutdownHost().
base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698