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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 131373004: Let the browser know the end of fling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile break Created 6 years, 11 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_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 93d865b4a0cae79c44829ff6986df497cf42f871..3dbee551faf6155886636ffec4880d9a777c4da8 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -475,6 +475,7 @@ bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) {
IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame,
msg_is_ok = OnSwapCompositorFrame(msg))
IPC_MESSAGE_HANDLER(ViewHostMsg_DidOverscroll, OnOverscrolled)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_DidStopFlinging, OnFlingingStopped)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect)
IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateIsDelayed, OnUpdateIsDelayed)
IPC_MESSAGE_HANDLER(ViewHostMsg_Focus, OnFocus)
@@ -1534,6 +1535,11 @@ void RenderWidgetHostImpl::OnOverscrolled(
view_->OnOverscrolled(accumulated_overscroll, current_fling_velocity);
}
+void RenderWidgetHostImpl::OnFlingingStopped() {
+ if (view_)
+ view_->DidStopFlinging();
+}
+
void RenderWidgetHostImpl::OnUpdateRect(
const ViewHostMsg_UpdateRect_Params& params) {
TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect");

Powered by Google App Engine
This is Rietveld 408576698