Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 1063853005: Unify Android Webview and Chrome's fling (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 af50532b6375159ed83ca38273ff1604a33ca353..9ecdf0f91c671d449a739f5536f4b9e0f808c8fd 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
@@ -1205,9 +1205,8 @@ public class ContentViewCore
*/
@CalledByNative
public boolean isScrollInProgress() {
- return mTouchScrollInProgress
- || mPotentiallyActiveFlingCount > 0
- || getContentViewClient().isExternalFlingActive();
+ return mTouchScrollInProgress || mPotentiallyActiveFlingCount > 0
+ || getContentViewClient().isExternalScrollActive();
}
@SuppressWarnings("unused")
@@ -1226,10 +1225,6 @@ public class ContentViewCore
@CalledByNative
private void onFlingStartEventHadNoConsumer(int vx, int vy) {
mTouchScrollInProgress = false;
- for (mGestureStateListenersIterator.rewind();
- mGestureStateListenersIterator.hasNext();) {
- mGestureStateListenersIterator.next().onUnhandledFlingStartEvent(vx, vy);
- }
}
@SuppressWarnings("unused")
@@ -1313,8 +1308,7 @@ public class ContentViewCore
nativeDoubleTap(mNativeContentViewCore, timeMs, x, y);
}
- @VisibleForTesting
- public void flingForTest(long timeMs, int x, int y, int velocityX, int velocityY) {
+ public void fling(long timeMs, int x, int y, int velocityX, int velocityY) {
if (mNativeContentViewCore == 0) return;
nativeFlingCancel(mNativeContentViewCore, timeMs);
nativeScrollBegin(mNativeContentViewCore, timeMs, x, y, velocityX, velocityY);

Powered by Google App Engine
This is Rietveld 408576698