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

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

Issue 2792063003: Factor out RenderWidgetHostConnector (Closed)
Patch Set: format 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 42c5977e12adc3768bd14ac6587b2c6856ccbabf..bb14d9eed1da958982b08cca7d0f94727d28fb17 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
@@ -864,13 +864,14 @@ public class ContentViewCore
private void setTouchScrollInProgress(boolean inProgress) {
if (mTouchScrollInProgress == inProgress) return;
mTouchScrollInProgress = inProgress;
- mSelectionPopupController.hideActionMode(inProgress);
+ mSelectionPopupController.setTouchScrollInProgress(inProgress);
}
@SuppressWarnings("unused")
@CalledByNative
private void onFlingStartEventConsumed() {
mPotentiallyActiveFlingCount++;
+ mSelectionPopupController.setIsFlinging(true);
setTouchScrollInProgress(false);
for (mGestureStateListenersIterator.rewind();
mGestureStateListenersIterator.hasNext();) {
@@ -1602,13 +1603,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);
@@ -1790,12 +1784,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);
}
@@ -2371,6 +2359,7 @@ public class ContentViewCore
setTouchScrollInProgress(false);
mPotentiallyActiveFlingCount = 0;
+ mSelectionPopupController.setIsFlinging(false);
if (touchScrollInProgress) updateGestureStateListener(GestureEventType.SCROLL_END);
if (potentiallyActiveFlingCount > 0) updateGestureStateListener(GestureEventType.FLING_END);
}
@@ -2382,6 +2371,7 @@ public class ContentViewCore
setTouchScrollInProgress(false);
if (mPotentiallyActiveFlingCount <= 0) return;
mPotentiallyActiveFlingCount--;
+ if (mPotentiallyActiveFlingCount == 0) mSelectionPopupController.setIsFlinging(false);
updateGestureStateListener(GestureEventType.FLING_END);
}

Powered by Google App Engine
This is Rietveld 408576698