Index: content/public/android/java/src/org/chromium/content/browser/SnapScrollController.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/SnapScrollController.java b/content/public/android/java/src/org/chromium/content/browser/SnapScrollController.java |
index 68a6c02febdefd5fcbeefbb9f82bed30d377c07a..99a8b5c0b1563892a095ce3699c0fa06b62394b9 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/SnapScrollController.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/SnapScrollController.java |
@@ -24,11 +24,9 @@ class SnapScrollController { |
private int mFirstTouchY = -1; |
private float mDistanceX = 0; |
private float mDistanceY = 0; |
- private ZoomManager mZoomManager; |
- SnapScrollController(Context context, ZoomManager zoomManager) { |
+ SnapScrollController(Context context) { |
calculateChannelDistance(context); |
- mZoomManager = zoomManager; |
} |
/** |
@@ -63,7 +61,7 @@ class SnapScrollController { |
* Sets the snap scroll mode based on the event type. |
* @param event The received MotionEvent. |
*/ |
- void setSnapScrollingMode(MotionEvent event) { |
+ void setSnapScrollingMode(MotionEvent event, boolean isScaleGestureDetectionInProgress) { |
switch(event.getAction()) { |
case MotionEvent.ACTION_DOWN: |
mSnapScrollMode = SNAP_NONE; |
@@ -76,7 +74,7 @@ class SnapScrollController { |
// and movement towards x-axis is trivial. |
// Scrolling mode will remain in SNAP_NONE for other conditions. |
case MotionEvent.ACTION_MOVE: |
- if (!mZoomManager.isScaleGestureDetectionInProgress() && |
+ if (!isScaleGestureDetectionInProgress && |
mSnapScrollMode == SNAP_NONE) { |
int xDiff = (int) Math.abs(event.getX() - mFirstTouchX); |
int yDiff = (int) Math.abs(event.getY() - mFirstTouchY); |