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

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 ba0c70ebeaa44f086df6ca89bf046cf7f4b47a4d..395f5fa1b3d62deb31ba9ad9a7c2794715697641 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
@@ -646,6 +646,18 @@ public class ContentViewCore
// been destroyed in the RenderWidgetHostView.
}
};
+
+ // Add a hover feature Listener to dispatch a mouseover event when the hover switch is on.
+ mContainerView.setOnHoverListener(new View.OnHoverListener() {
+ @Override
+ public boolean onHover(View view, MotionEvent motionEvent) {
jdduke (slow) 2014/10/29 21:43:18 It's not clear to me why we need this? Won't we al
+ if (!CommandLine.getInstance().hasSwitch(
+ ContentSwitches.ENABLE_SUPPORT_HOVER_CAPABLE_TOUCHSCREENS))
+ return true;
+
+ return false;
+ }
+ });
}
/**

Powered by Google App Engine
This is Rietveld 408576698