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

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

Issue 1680143002: Simulate click through gamepad BUTTON_A (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simulate click Created 4 years, 7 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/common/frame_messages.h ('k') | content/renderer/render_frame_impl.h » ('j') | 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 0f29638937d97ae92300dc06ee9ef87ebcd6d3f2..443c05d52591271a1ae901e5ee43715717b36c5d 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
@@ -1694,6 +1694,10 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
*/
public boolean dispatchKeyEvent(KeyEvent event) {
if (GamepadList.dispatchKeyEvent(event)) return true;
+ if (event.getKeyCode() == KeyEvent.KEYCODE_BUTTON_A) {
+ nativeSimulateClick(mNativeContentViewCore);
+ return true;
+ }
if (getContentViewClient().shouldOverrideKeyEvent(event)) {
return mContainerViewInternals.super_dispatchKeyEvent(event);
}
@@ -3441,6 +3445,8 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
private native int nativeSendMouseWheelEvent(long nativeContentViewCoreImpl, long timeMs,
float x, float y, float ticksX, float ticksY, float pixelsPerTick);
+ private native void nativeSimulateClick(long nativeContentViewCoreImpl);
+
private native void nativeScrollBegin(long nativeContentViewCoreImpl, long timeMs, float x,
float y, float hintX, float hintY, boolean targetViewport);
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698