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

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

Issue 687323002: Experiment with emulating mouse hover with touch hover capable devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/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 20c24c2d600a24530ff17f1fba9dbee275a23425..8a6ed8a19e76029ebb111ca2fdc8a9e7ba3d4e76 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
@@ -1550,6 +1550,12 @@ public class ContentViewCore
*/
public boolean onHoverEvent(MotionEvent event) {
TraceEvent.begin("onHoverEvent");
+ // Dispatch a mouseover event when the touch hover switch is on and the event is
+ // a finger hover.
Rick Byers 2014/11/13 19:32:15 Please add a comment like: TODO(lanwei) Remove thi
lanwei 2014/12/01 15:25:19 Done.
+ if (!CommandLine.getInstance().hasSwitch(ContentSwitches.ENABLE_TOUCH_HOVER)
+ && event.getToolType(0) == MotionEvent.TOOL_TYPE_FINGER
+ && event.getSource() == InputDevice.SOURCE_TOUCHSCREEN)
+ return true;
jdduke (slow) 2014/11/13 19:38:44 So the SPen hover events always indicate that they
jdduke (slow) 2014/11/13 19:47:40 Nevermind, I thought the airview feature was SPen-
lanwei 2014/12/01 15:25:19 Done.
MotionEvent offset = createOffsetMotionEvent(event);
try {
if (mBrowserAccessibilityManager != null) {

Powered by Google App Engine
This is Rietveld 408576698