| 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 2e8d56df7541aa7ac99a288fcb4175b669c4477b..b6700b0328726bf6efe0630fbf36e87ec715a6aa 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
|
| @@ -59,6 +59,7 @@ import org.chromium.content.browser.ScreenOrientationListener.ScreenOrientationO
|
| import org.chromium.content.browser.accessibility.AccessibilityInjector;
|
| import org.chromium.content.browser.accessibility.BrowserAccessibilityManager;
|
| import org.chromium.content.browser.input.AdapterInputConnection;
|
| +import org.chromium.content.browser.input.GamepadList;
|
| import org.chromium.content.browser.input.HandleView;
|
| import org.chromium.content.browser.input.ImeAdapter;
|
| import org.chromium.content.browser.input.ImeAdapter.AdapterInputConnectionFactory;
|
| @@ -1455,6 +1456,7 @@ public class ContentViewCore
|
| setAccessibilityState(mAccessibilityManager.isEnabled());
|
|
|
| ScreenOrientationListener.getInstance().addObserver(this, mContext);
|
| + GamepadList.onAttachedToWindow(mContext);
|
| }
|
|
|
| /**
|
| @@ -1469,6 +1471,7 @@ public class ContentViewCore
|
| unregisterAccessibilityContentObserver();
|
|
|
| ScreenOrientationListener.getInstance().removeObserver(this);
|
| + GamepadList.onDetachedFromWindow();
|
| }
|
|
|
| /**
|
| @@ -1696,6 +1699,7 @@ public class ContentViewCore
|
| * @see View#dispatchKeyEvent(KeyEvent)
|
| */
|
| public boolean dispatchKeyEvent(KeyEvent event) {
|
| + if (GamepadList.dispatchKeyEvent(event)) return true;
|
| if (getContentViewClient().shouldOverrideKeyEvent(event)) {
|
| return mContainerViewInternals.super_dispatchKeyEvent(event);
|
| }
|
| @@ -1747,6 +1751,7 @@ public class ContentViewCore
|
| * @see View#onGenericMotionEvent(MotionEvent)
|
| */
|
| public boolean onGenericMotionEvent(MotionEvent event) {
|
| + if (GamepadList.onGenericMotionEvent(event)) return true;
|
| if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
|
| switch (event.getAction()) {
|
| case MotionEvent.ACTION_SCROLL:
|
|
|