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

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

Issue 2902303002: phase based wheel scroll latching for mac (Closed)
Patch Set: review comments addressed. Created 3 years, 7 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 ac198a442454506a9caf84b3b7a029576ba257cf..fb905412a9bcb184388dcceadac522afbfa94a97 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -487,6 +487,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// Get the focused view that should be used for retrieving the text selection.
RenderWidgetHostViewBase* GetFocusedViewForTextSelection();
+ void ScheduleMouseWheelEndDispatching(blink::WebMouseWheelEvent wheel_event,
+ bool should_route_event);
+ void DispatchPendingWheelEndEvent();
+ void IgnorePendingWheelEndEvent();
+ bool HasPendingWheelEndEvent();
+
// Returns the RenderWidgetHostDelegate corresponding to the currently focused
// RenderWidgetHost. It is different from |render_widget_host_->delegate()|
// when there are focused inner WebContentses on the page. Also, this method
@@ -516,6 +522,10 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// Adds/Removes frame observer based on state.
void UpdateNeedsBeginFramesInternal();
+ void SendSyntheticWheelEventWithPhaseEnded(
+ blink::WebMouseWheelEvent wheel_event,
+ bool should_route_event);
+
// 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.
@@ -565,6 +575,8 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
SkColor background_color_ = SK_ColorTRANSPARENT;
SkColor last_frame_root_background_color_ = SK_ColorTRANSPARENT;
+ base::OneShotTimer mouse_wheel_end_dispatch_timer_;
+
// Factory used to safely scope delayed calls to ShutdownHost().
base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698