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

Unified Diff: content/renderer/input/input_handler_proxy.cc

Issue 131373004: Let the browser know the end of fling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DidStartFlinging(); Don't bother ContentViewGestureHandler and GestureEventFilter # 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/renderer/input/input_handler_proxy.cc
diff --git a/content/renderer/input/input_handler_proxy.cc b/content/renderer/input/input_handler_proxy.cc
index fa95881c2f1528239cb7f92f94a60e52d056d045..b66f5ac82b9f83745a27af2d3f1163131b48de3e 100644
--- a/content/renderer/input/input_handler_proxy.cc
+++ b/content/renderer/input/input_handler_proxy.cc
@@ -295,6 +295,7 @@ InputHandlerProxy::HandleGestureFling(
fling_parameters_.modifiers = gesture_event.modifiers;
fling_parameters_.sourceDevice = gesture_event.sourceDevice;
input_handler_->ScheduleAnimation();
+ client_->DidStartFlinging();
return DID_HANDLE;
}
case cc::InputHandler::ScrollOnMainThread: {
@@ -303,6 +304,7 @@ InputHandlerProxy::HandleGestureFling(
"scroll_on_main_thread",
TRACE_EVENT_SCOPE_THREAD);
fling_may_be_active_on_main_thread_ = true;
+ client_->DidStartFlinging();
jdduke (slow) 2014/01/10 17:45:59 So, if the fling goes unhandled by main, the |DidS
return DID_NOT_HANDLE;
}
case cc::InputHandler::ScrollIgnored: {
@@ -352,6 +354,7 @@ void InputHandlerProxy::Animate(base::TimeTicks time) {
void InputHandlerProxy::MainThreadHasStoppedFlinging() {
fling_may_be_active_on_main_thread_ = false;
+ client_->DidStopFlinging();
}
void InputHandlerProxy::DidOverscroll(const cc::DidOverscrollParams& params) {
@@ -388,6 +391,8 @@ bool InputHandlerProxy::CancelCurrentFling() {
fling_curve_.reset();
gesture_scroll_on_impl_thread_ = false;
fling_parameters_ = blink::WebActiveWheelFlingParameters();
+ if (had_fling_animation)
+ client_->DidStopFlinging();
return had_fling_animation;
}

Powered by Google App Engine
This is Rietveld 408576698