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

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

Issue 2637143002: Reroute Android mouse events to touch event path. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | 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 9f97f23f810dfe48d007672441057d7d73deea0c..ce2ee82caafa55761070ad421262d5b01aad5c7a 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
@@ -964,14 +964,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
public boolean onTouchEvent(MotionEvent event) {
// TODO(mustaq): Should we include MotionEvent.TOOL_TYPE_STYLUS here?
// crbug.com/592082
- if (event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE) {
- // Mouse button info is incomplete on L and below
- int apiVersion = Build.VERSION.SDK_INT;
- if (apiVersion >= android.os.Build.VERSION_CODES.M) {
- return sendMouseEvent(event);
- }
- }
-
final boolean isTouchHandleEvent = false;
return sendTouchEvent(event, isTouchHandleEvent);
}
@@ -1590,13 +1582,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
event.getAxisValue(MotionEvent.AXIS_VSCROLL),
mRenderCoordinates.getWheelScrollFactor());
return true;
- case MotionEvent.ACTION_BUTTON_PRESS:
- case MotionEvent.ACTION_BUTTON_RELEASE:
- // TODO(mustaq): Should we include MotionEvent.TOOL_TYPE_STYLUS here?
- // crbug.com/592082
- if (event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE) {
- return sendMouseEvent(event);
- }
}
} else if ((event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
if (mJoystickScrollProvider.onMotion(event)) return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698