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

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

Issue 1403893003: Plumb gesture source value through Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make compilers happy. Created 5 years, 2 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 b5dcb181261f6f8b19f7d1a13c7dfc73caa41b4b..c5d14195ee3f865c8ec9479e714cf57bcd6c7db2 100644
--- a/content/renderer/input/input_handler_proxy.cc
+++ b/content/renderer/input/input_handler_proxy.cc
@@ -499,9 +499,10 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleGestureScrollEnd(
InputHandlerProxy::EventDisposition InputHandlerProxy::HandleGestureFlingStart(
const WebGestureEvent& gesture_event) {
- cc::InputHandler::ScrollStatus scroll_status;
-
- if (gesture_event.sourceDevice == blink::WebGestureDeviceTouchpad) {
+ cc::InputHandler::ScrollStatus scroll_status =
+ cc::InputHandler::SCROLL_ON_MAIN_THREAD;
+ switch (gesture_event.sourceDevice) {
+ case blink::WebGestureDeviceTouchpad:
if (gesture_event.data.flingStart.targetViewport) {
scroll_status = input_handler_->RootScrollBegin(
cc::InputHandler::NON_BUBBLING_GESTURE);
@@ -510,11 +511,16 @@ InputHandlerProxy::EventDisposition InputHandlerProxy::HandleGestureFlingStart(
gfx::Point(gesture_event.x, gesture_event.y),
cc::InputHandler::NON_BUBBLING_GESTURE);
}
- } else {
+ break;
+ case blink::WebGestureDeviceTouchscreen:
if (!gesture_scroll_on_impl_thread_)
scroll_status = cc::InputHandler::SCROLL_ON_MAIN_THREAD;
else
scroll_status = input_handler_->FlingScrollBegin();
+ break;
+ case blink::WebGestureDeviceUninitialized:
+ NOTREACHED();
+ return DID_NOT_HANDLE;
}
#ifndef NDEBUG
@@ -1022,6 +1028,9 @@ bool InputHandlerProxy::scrollBy(const WebFloatSize& increment,
HandleOverscroll(fling_parameters_.point, scroll_result);
did_scroll = scroll_result.did_scroll;
} break;
+ case blink::WebGestureDeviceUninitialized:
+ NOTREACHED();
+ return false;
}
if (did_scroll) {

Powered by Google App Engine
This is Rietveld 408576698