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

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

Issue 2826303003: Let selection events bypass ContentViewCore (Closed)
Patch Set: call Initialize() Created 3 years, 8 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 68d484b08d3fa8644d8b3d7f837068f86a9549ff..300bb7f65f8b2d429fa1081e965c82c56df0becb 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
@@ -824,9 +824,8 @@ public class ContentViewCore
}
private void setTouchScrollInProgress(boolean inProgress) {
- if (mTouchScrollInProgress == inProgress) return;
mTouchScrollInProgress = inProgress;
- mSelectionPopupController.hideActionMode(inProgress);
+ mSelectionPopupController.setScrollInProgress(isScrollInProgress());
}
@SuppressWarnings("unused")
@@ -1584,13 +1583,6 @@ public class ContentViewCore
mPreserveSelectionOnNextLossOfFocus = true;
}
- @CalledByNative
- private void onSelectionEvent(
- int eventType, int xAnchor, int yAnchor, int left, int top, int right, int bottom) {
- mSelectionPopupController.onSelectionEvent(eventType, xAnchor, yAnchor,
- left, top, right, bottom, isScrollInProgress(), mTouchScrollInProgress);
- }
-
private void setTextHandlesTemporarilyHidden(boolean hide) {
if (mNativeContentViewCore == 0) return;
nativeSetTextHandlesTemporarilyHidden(mNativeContentViewCore, hide);
@@ -1772,12 +1764,6 @@ public class ContentViewCore
@SuppressWarnings("unused")
@CalledByNative
- private void onSelectionChanged(String text) {
- mSelectionPopupController.onSelectionChanged(text);
- }
-
- @SuppressWarnings("unused")
- @CalledByNative
private void performLongPressHapticFeedback() {
mContainerView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
}
@@ -2351,20 +2337,21 @@ public class ContentViewCore
final boolean touchScrollInProgress = mTouchScrollInProgress;
final int potentiallyActiveFlingCount = mPotentiallyActiveFlingCount;
- setTouchScrollInProgress(false);
mPotentiallyActiveFlingCount = 0;
+ setTouchScrollInProgress(false);
if (touchScrollInProgress) updateGestureStateListener(GestureEventType.SCROLL_END);
if (potentiallyActiveFlingCount > 0) updateGestureStateListener(GestureEventType.FLING_END);
}
@CalledByNative
private void onNativeFlingStopped() {
+ if (mPotentiallyActiveFlingCount > 0) {
+ mPotentiallyActiveFlingCount--;
+ updateGestureStateListener(GestureEventType.FLING_END);
+ }
// Note that mTouchScrollInProgress should normally be false at this
// point, but we reset it anyway as another failsafe.
setTouchScrollInProgress(false);
- if (mPotentiallyActiveFlingCount <= 0) return;
- mPotentiallyActiveFlingCount--;
- updateGestureStateListener(GestureEventType.FLING_END);
}
// DisplayAndroidObserver method.

Powered by Google App Engine
This is Rietveld 408576698