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

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: Convert more tests (related to CL) to use Touchscreen. 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
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/renderer/input/input_handler_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cee4871957beafd08bd22998161ab6b9e6d7a937..35f8bc764cacea574a84f0e3dc482c95f0ad79e2 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
@@ -1017,6 +1023,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) {
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/renderer/input/input_handler_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698