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

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

Issue 189693002: [Android] Cache additional MotionEvent bits in MotionEventAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final cleanup Created 6 years, 9 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/browser/renderer_host/input/motion_event_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 4babcb907f11833081b671c9d05102421bc922a1..b021e57827b11b07e1f2d791018b184a16259292 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -1172,7 +1172,15 @@ public class ContentViewCore implements NavigationClient, AccessibilityStateChan
}
if (mNativeContentViewCore == 0) return false;
- return nativeOnTouchEvent(mNativeContentViewCore, event);
+ final int pointerCount = event.getPointerCount();
+ return nativeOnTouchEvent(mNativeContentViewCore, event,
+ event.getEventTime(), eventAction,
+ pointerCount, event.getHistorySize(), event.getActionIndex(),
+ event.getX(), event.getY(),
+ pointerCount > 1 ? event.getX(1) : 0,
+ pointerCount > 1 ? event.getY(1) : 0,
+ event.getPointerId(0), pointerCount > 1 ? event.getPointerId(1) : -1,
+ event.getTouchMajor(), pointerCount > 1 ? event.getTouchMajor(1) : 0);
}
public void setIgnoreRemainingTouchEvents() {
@@ -3174,7 +3182,12 @@ public class ContentViewCore implements NavigationClient, AccessibilityStateChan
long nativeContentViewCoreImpl, int orientation);
// All touch events (including flings, scrolls etc) accept coordinates in physical pixels.
- private native boolean nativeOnTouchEvent(long nativeContentViewCoreImpl, MotionEvent event);
+ private native boolean nativeOnTouchEvent(
+ long nativeContentViewCoreImpl, MotionEvent event,
+ long timeMs, int action, int pointerCount, int historySize, int actionIndex,
+ float x0, float y0, float x1, float y1,
+ int pointerId0, int pointerId1,
+ float touchMajor0, float touchMajor1);
private native int nativeSendMouseMoveEvent(
long nativeContentViewCoreImpl, long timeMs, float x, float y);
« no previous file with comments | « content/browser/renderer_host/input/motion_event_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698