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

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: Fix 0 distance case & add unit tests. 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..b2f0e66bcafc6442f0bf455facd84ad141aef30e 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,8 @@ bool SyntheticGestureTargetAura::SupportsSyntheticGestureSourceType(
gesture_source_type == SyntheticGestureParams::MOUSE_INPUT;
}
+int SyntheticGestureTargetAura::GetTouchSlopInDips() const {
+ return ui::GestureConfiguration::max_touch_move_in_pixels_for_click();
bulach 2013/12/02 18:24:51 is this "inclusive" ? as in, is the test < or <=,
Dominik Grewe 2013/12/02 18:50:04 Good point. The test seems to be for < (although t
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698