| Index: content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java b/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java
|
| index f0b15e8e899525c8c9cc3dd8d5d5d742bb9b8067..0a7a32d56ea8f1924268a637cf8d82a118baa547 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java
|
| @@ -58,9 +58,6 @@ public class PopupTouchHandleDrawable extends View {
|
|
|
| private final int[] mTempScreenCoords = new int[2];
|
|
|
| - static final int LEFT = 0;
|
| - static final int CENTER = 1;
|
| - static final int RIGHT = 2;
|
| private int mOrientation = -1;
|
|
|
| // Length of the delay before fading in after the last page movement.
|
| @@ -144,8 +141,10 @@ public class PopupTouchHandleDrawable extends View {
|
| return handled;
|
| }
|
|
|
| + @CalledByNative
|
| private void setOrientation(int orientation) {
|
| - assert orientation >= LEFT && orientation <= RIGHT;
|
| + assert orientation >= TouchHandleOrientation.TOUCH_HANDLE_LEFT
|
| + && orientation <= TouchHandleOrientation.TOUCH_HANDLE_RIGHT;
|
| if (mOrientation == orientation) return;
|
|
|
| final boolean hadValidOrientation = mOrientation != -1;
|
| @@ -155,19 +154,19 @@ public class PopupTouchHandleDrawable extends View {
|
| final int oldAdjustedPositionY = getAdjustedPositionY();
|
|
|
| switch (orientation) {
|
| - case LEFT: {
|
| + case TouchHandleOrientation.TOUCH_HANDLE_LEFT: {
|
| mDrawable = HandleViewResources.getLeftHandleDrawable(mContext);
|
| mHotspotX = (mDrawable.getIntrinsicWidth() * 3) / 4f;
|
| break;
|
| }
|
|
|
| - case RIGHT: {
|
| + case TouchHandleOrientation.TOUCH_HANDLE_RIGHT: {
|
| mDrawable = HandleViewResources.getRightHandleDrawable(mContext);
|
| mHotspotX = mDrawable.getIntrinsicWidth() / 4f;
|
| break;
|
| }
|
|
|
| - case CENTER:
|
| + case TouchHandleOrientation.TOUCH_HANDLE_CENTER:
|
| default: {
|
| mDrawable = HandleViewResources.getCenterHandleDrawable(mContext);
|
| mHotspotX = mDrawable.getIntrinsicWidth() / 2f;
|
| @@ -344,21 +343,6 @@ public class PopupTouchHandleDrawable extends View {
|
| }
|
|
|
| @CalledByNative
|
| - private void setRightOrientation() {
|
| - setOrientation(RIGHT);
|
| - }
|
| -
|
| - @CalledByNative
|
| - private void setLeftOrientation() {
|
| - setOrientation(LEFT);
|
| - }
|
| -
|
| - @CalledByNative
|
| - private void setCenterOrientation() {
|
| - setOrientation(CENTER);
|
| - }
|
| -
|
| - @CalledByNative
|
| private void setOpacity(float alpha) {
|
| // Ignore opacity updates from the caller as they are not compatible
|
| // with the custom fade animation.
|
|
|