| 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 b7bbcf4a397e658a310bdee6820141c556d4b7cd..1c1df9bc3b211691871a5c92a0e47e315a6e627e 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
|
| @@ -64,6 +64,7 @@ import org.chromium.content.browser.input.GamepadList;
|
| import org.chromium.content.browser.input.ImeAdapter;
|
| import org.chromium.content.browser.input.InputMethodManagerWrapper;
|
| import org.chromium.content.browser.input.JoystickScrollProvider;
|
| +import org.chromium.content.browser.input.JoystickZoomProvider;
|
| import org.chromium.content.browser.input.LegacyPastePopupMenu;
|
| import org.chromium.content.browser.input.PastePopupMenu;
|
| import org.chromium.content.browser.input.PastePopupMenu.PastePopupMenuDelegate;
|
| @@ -494,6 +495,9 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
|
| // Provides smooth gamepad joystick-driven scrolling.
|
| private final JoystickScrollProvider mJoystickScrollProvider;
|
|
|
| + // Provides smooth gamepad joystick-driven zooming.
|
| + private JoystickZoomProvider mJoystickZoomProvider;
|
| +
|
| private boolean mIsMobileOptimizedHint;
|
|
|
| // Tracks whether a selection is currently active. When applied to selected text, indicates
|
| @@ -1726,6 +1730,10 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
|
| }
|
| } else if ((event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
|
| if (mJoystickScrollProvider.onMotion(event)) return true;
|
| + if (mJoystickZoomProvider == null) {
|
| + mJoystickZoomProvider = new JoystickZoomProvider(this);
|
| + }
|
| + if (mJoystickZoomProvider.onMotion(event)) return true;
|
| }
|
| return mContainerViewInternals.super_onGenericMotionEvent(event);
|
| }
|
| @@ -2720,6 +2728,24 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Screen
|
| return true;
|
| }
|
|
|
| + public boolean pinchBegin(int xPix, int yPix) {
|
| + if (mNativeContentViewCore == 0) return false;
|
| + nativePinchBegin(mNativeContentViewCore, SystemClock.uptimeMillis(), xPix, yPix);
|
| + return true;
|
| + }
|
| +
|
| + public boolean pinchBy(int xPix, int yPix, float delta) {
|
| + if (mNativeContentViewCore == 0) return false;
|
| + nativePinchBy(mNativeContentViewCore, SystemClock.uptimeMillis(), xPix, yPix, delta);
|
| + return true;
|
| + }
|
| +
|
| + public boolean pinchEnd() {
|
| + if (mNativeContentViewCore == 0) return false;
|
| + nativePinchEnd(mNativeContentViewCore, SystemClock.uptimeMillis());
|
| + return true;
|
| + }
|
| +
|
| /**
|
| * Invokes the graphical zoom picker widget for this ContentView.
|
| */
|
|
|