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

Unified Diff: content/renderer/render_widget.cc

Issue 1102743002: OverscrollGlow for mainThread-{CHROMIUM CHANGES} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased to latest Created 5 years, 6 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 | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 9a206983c22e196141cd586d3c44133b8e2a22ca..c512d41fce1f9ef2586cbe2d416d3b84e793210e 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -2216,6 +2216,24 @@ void RenderWidget::didHandleGestureEvent(
#endif
}
+void RenderWidget::didOverscroll(
+ const blink::WebFloatSize& unusedDelta,
+ const blink::WebFloatSize& accumulatedRootOverScroll,
+ const blink::WebFloatPoint& position,
+ const blink::WebFloatSize& velocity) {
+ DidOverscrollParams params;
+ // TODO(jdduke): Consider bundling the overscroll with the input event ack to
+ // save an IPC.
+ params.accumulated_overscroll = gfx::Vector2dF(
+ accumulatedRootOverScroll.width, accumulatedRootOverScroll.height);
+ params.latest_overscroll_delta =
+ gfx::Vector2dF(unusedDelta.width, unusedDelta.height);
+ params.current_fling_velocity =
+ gfx::Vector2dF(velocity.width, velocity.height);
+ params.causal_event_viewport_point = gfx::PointF(position.x, position.y);
+ Send(new InputHostMsg_DidOverscroll(routing_id_, params));
+}
+
void RenderWidget::StartCompositor() {
// For widgets that are never visible, we don't need the compositor to run
// at all.
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698