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

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_target_aura.cc

Issue 95153002: Make touch-based synthetic gesture take touch slop into account. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused variable. Created 7 years 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/input/synthetic_gesture_target_aura.cc
diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
index 1d5c6a8d29c6e47aac67bae5999e81f0540222ab..9e103137adf3a3a994dcf08405432e8059b92bce 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_target_aura.cc
@@ -11,6 +11,7 @@
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
+#include "ui/events/gestures/gesture_configuration.h"
using blink::WebTouchEvent;
using blink::WebMouseWheelEvent;
@@ -70,4 +71,10 @@ bool SyntheticGestureTargetAura::SupportsSyntheticGestureSourceType(
gesture_source_type == SyntheticGestureParams::MOUSE_INPUT;
}
+int SyntheticGestureTargetAura::GetTouchSlopInDips() const {
+ // - 1 because Aura considers a pointer to be moving if it has moved at least
+ // 'max_touch_move_in_pixels_for_click' pixels.
+ return ui::GestureConfiguration::max_touch_move_in_pixels_for_click() - 1;
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698