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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/LongPressDetector.java

Issue 129783004: [Android] Always offer touchmove's for events with multiple pointers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates Created 6 years, 11 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/public/android/java/src/org/chromium/content/browser/LongPressDetector.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/LongPressDetector.java b/content/public/android/java/src/org/chromium/content/browser/LongPressDetector.java
index 91796692daa7c5a7288c0c8c8bf49352c3dbd83a..391441ecfa32458a0b3101e0c64425debb3f5997 100644
--- a/content/public/android/java/src/org/chromium/content/browser/LongPressDetector.java
+++ b/content/public/android/java/src/org/chromium/content/browser/LongPressDetector.java
@@ -25,14 +25,6 @@ class LongPressDetector {
private final int mTouchSlopSquare;
private boolean mInLongPress;
- // The following are used when touch events are offered to native, and not for
- // anything relating to the GestureDetector.
- // True iff a touch_move has exceeded the touch slop distance.
- private boolean mMoveConfirmed;
- // Coordinates of the start of a touch event (i.e. the touch_down).
- private int mTouchInitialX;
- private int mTouchInitialY;
-
private static final int LONG_PRESS = 2;
private static final int LONGPRESS_TIMEOUT = ViewConfiguration.getLongPressTimeout();
@@ -163,25 +155,6 @@ class LongPressDetector {
return mCurrentDownEvent != null;
}
- void onOfferTouchEventToJavaScript(MotionEvent event) {
- if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
- mMoveConfirmed = false;
- mTouchInitialX = Math.round(event.getX());
- mTouchInitialY = Math.round(event.getY());
- }
- }
-
- boolean confirmOfferMoveEventToJavaScript(MotionEvent event) {
- if (!mMoveConfirmed) {
- int deltaX = Math.round(event.getX()) - mTouchInitialX;
- int deltaY = Math.round(event.getY()) - mTouchInitialY;
- if (deltaX * deltaX + deltaY * deltaY >= mTouchSlopSquare) {
- mMoveConfirmed = true;
- }
- }
- return mMoveConfirmed;
- }
-
/**
* This is for testing only.
* Sends a LongPress gesture. This should always be called after a down event.

Powered by Google App Engine
This is Rietveld 408576698