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

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

Issue 12077046: Plumb an overscroll callback form the compositor to the Android UI thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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 0420735db44d1da797856e2472589ce9239337a9..3d0adc411164daddd4f6769b97f557011e3671c7 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
@@ -157,6 +157,14 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
* @see View#awakenScrollBars(int, boolean)
*/
boolean super_awakenScrollBars(int startDelay, boolean invalidate);
+
+ /**
+ * Called when the user tries to scroll more than it is possible.
+ *
+ * @param deltaX "left over" horizontal scroll offset.
+ * @param deltaX "left over" vertical scroll offset.
+ */
+ void onOverScroll(int deltaX, int deltaY);
}
/**
@@ -1969,6 +1977,14 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
@SuppressWarnings("unused")
@CalledByNative
+ private void updateUnusedScrollOffset(int x, int y) {
+ if (x != 0 && y != 0) {
+ mContainerViewInternals.onOverScroll(x, y);
+ }
+ }
+
+ @SuppressWarnings("unused")
+ @CalledByNative
private void imeUpdateAdapter(int nativeImeAdapterAndroid, int textInputType,
String text, int selectionStart, int selectionEnd,
int compositionStart, int compositionEnd, boolean showImeIfNeeded) {

Powered by Google App Engine
This is Rietveld 408576698