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

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

Issue 2637183003: 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 32c458d369891351996b948bc83a1483bf93d34c..cdfd164d93f662c8130345ed64d33b94ba6cd5a8 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
@@ -1009,14 +1009,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);
}
@@ -1669,13 +1661,6 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
};
mContainerView.postDelayed(mFakeMouseMoveRunnable, 250);
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