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

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

Issue 1063853005: Unify Android Webview and Chrome's fling (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: add proguard 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
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 a918e9b530854ff1cd510a6e2e749875848bae99..e8e8f37dfc1abf5318c4cfa852cfd4e5a909e0d8 100644
--- a/content/renderer/input/input_handler_proxy.cc
+++ b/content/renderer/input/input_handler_proxy.cc
@@ -419,7 +419,9 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleMouseWheel(
InputHandlerProxy::EventDisposition InputHandlerProxy::HandleGestureScrollBegin(
const WebGestureEvent& gesture_event) {
- DCHECK(!gesture_scroll_on_impl_thread_);
+ if (gesture_scroll_on_impl_thread_)
+ CancelCurrentFling();
+
#ifndef NDEBUG
DCHECK(!expect_scroll_update_end_);
expect_scroll_update_end_ = true;
@@ -531,7 +533,7 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleGestureFlingStart(
WebPoint(gesture_event.globalX, gesture_event.globalY);
fling_parameters_.modifiers = gesture_event.modifiers;
fling_parameters_.sourceDevice = gesture_event.sourceDevice;
- input_handler_->SetNeedsAnimate();
+ input_handler_->SetNeedsAnimateInput();
return DID_HANDLE;
}
case cc::InputHandler::SCROLL_UNKNOWN:
@@ -753,7 +755,7 @@ void InputHandlerProxy::Animate(base::TimeTicks time) {
monotonic_time_sec >= fling_parameters_.startTime +
kMaxSecondsFromFlingTimestampToFirstAnimate) {
fling_parameters_.startTime = monotonic_time_sec;
- input_handler_->SetNeedsAnimate();
+ input_handler_->SetNeedsAnimateInput();
return;
}
}
@@ -766,7 +768,7 @@ void InputHandlerProxy::Animate(base::TimeTicks time) {
fling_is_active = false;
if (fling_is_active) {
- input_handler_->SetNeedsAnimate();
+ input_handler_->SetNeedsAnimateInput();
} else {
TRACE_EVENT_INSTANT0("input",
"InputHandlerProxy::animate::flingOver",
« no previous file with comments | « content/public/browser/android/synchronous_compositor_client.h ('k') | content/renderer/input/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698