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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 145953005: Expose more gestures to ContentViewCore.GestureStateListeners (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 6 years, 11 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
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 9371b09422912ad606f5ef145d750a5b1d85143a..9435a36129e6ec3f06b6d5998d90f256b9a194f2 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -48,6 +48,7 @@ import org.chromium.content.browser.LoadUrlParams;
import org.chromium.content.browser.NavigationHistory;
import org.chromium.content.browser.PageTransitionTypes;
import org.chromium.content.common.CleanupReference;
+import org.chromium.content_public.browser.GestureStateListener;
import org.chromium.ui.base.ActivityWindowAndroid;
import org.chromium.ui.base.WindowAndroid;
import org.chromium.ui.gfx.DeviceDisplayInfo;
@@ -382,7 +383,7 @@ public class AwContents {
}
//--------------------------------------------------------------------------------------------
- private class AwGestureStateListener implements ContentViewCore.GestureStateListener {
+ private class AwGestureStateListener extends GestureStateListener {
@Override
public void onPinchGestureStart() {
// While it's possible to re-layout the view during a pinch gesture, the effect is very
@@ -400,7 +401,8 @@ public class AwContents {
}
@Override
- public void onFlingStartGesture(int velocityX, int velocityY) {
+ public void onFlingStartGesture(
+ int velocityX, int velocityY, int scrollOffsetY, int scrollExtentY) {
mScrollOffsetManager.onFlingStartGesture(velocityX, velocityY);
}
@@ -516,7 +518,7 @@ public class AwContents {
private static ContentViewCore createAndInitializeContentViewCore(ViewGroup containerView,
InternalAccessDelegate internalDispatcher, int nativeWebContents,
- ContentViewCore.GestureStateListener pinchGestureStateListener,
+ GestureStateListener gestureStateListener,
ContentViewClient contentViewClient,
ContentViewCore.ZoomControlsDelegate zoomControlsDelegate) {
Context context = containerView.getContext();
@@ -525,7 +527,7 @@ public class AwContents {
context instanceof Activity ?
new ActivityWindowAndroid((Activity) context) :
new WindowAndroid(context.getApplicationContext()));
- contentViewCore.setGestureStateListener(pinchGestureStateListener);
+ contentViewCore.addGestureStateListener(gestureStateListener);
contentViewCore.setContentViewClient(contentViewClient);
contentViewCore.setZoomControlsDelegate(zoomControlsDelegate);
return contentViewCore;
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698