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 974f69353e715413a06e07cd2a46528d41c74b49..fec7756f42d916fe7ba13dfac780588306f3039f 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 |
@@ -1244,8 +1244,7 @@ public class ContentViewCore implements |
} |
public boolean isScrollInProgress() { |
- return mTouchScrollInProgress || mPotentiallyActiveFlingCount > 0 |
- || getContentViewClient().isExternalScrollActive(); |
+ return mTouchScrollInProgress || mPotentiallyActiveFlingCount > 0; |
} |
@SuppressWarnings("unused") |
@@ -1354,6 +1353,13 @@ public class ContentViewCore implements |
nativeFlingStart(mNativeContentViewCore, timeMs, 0, 0, velocityX, velocityY, true); |
} |
+ public void smoothScroll(long timeMs, int startX, int startY, int dx, int dy, long durationMs) { |
+ if (mNativeContentViewCore == 0) return; |
+ nativeFlingCancel(mNativeContentViewCore, timeMs); |
+ nativeScrollBegin(mNativeContentViewCore, timeMs, startX, startY, -dx, -dy, true); |
+ nativeSmoothScrollStart(mNativeContentViewCore, timeMs, startX, startY, dx, dy, durationMs); |
+ } |
+ |
/** |
* Cancel any fling gestures active. |
* @param timeMs Current time (in milliseconds). |
@@ -1395,9 +1401,6 @@ public class ContentViewCore implements |
computeVerticalScrollOffset(), |
computeVerticalScrollExtent()); |
break; |
- case GestureEventType.FLING_CANCEL: |
- listener.onFlingCancelGesture(); |
- break; |
case GestureEventType.SCROLL_START: |
listener.onScrollStarted( |
computeVerticalScrollOffset(), |
@@ -3247,6 +3250,9 @@ public class ContentViewCore implements |
private native void nativeFlingCancel(long nativeContentViewCoreImpl, long timeMs); |
+ private native void nativeSmoothScrollStart(long nativeContentViewCoreImpl, long timeMs, |
+ float startX, float startY, float dx, float dy, long durationMs); |
+ |
private native void nativeSingleTap( |
long nativeContentViewCoreImpl, long timeMs, float x, float y); |