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 fafdcbd322118899a193021b29374b042fbd28e0..c6f06909cfe6721a36ddc43c9c1050028c26a246 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 |
@@ -48,6 +48,7 @@ import org.chromium.content.browser.input.SelectPopup; |
import org.chromium.content.browser.input.SelectPopupDialog; |
import org.chromium.content.browser.input.SelectPopupDropdown; |
import org.chromium.content.browser.input.SelectPopupItem; |
+import org.chromium.content.browser.input.TextSuggestionHost; |
import org.chromium.content_public.browser.AccessibilitySnapshotCallback; |
import org.chromium.content_public.browser.AccessibilitySnapshotNode; |
import org.chromium.content_public.browser.ActionModeCallbackHelper; |
@@ -218,6 +219,8 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa |
// Only valid when focused on a text / password field. |
private ImeAdapter mImeAdapter; |
+ private TextSuggestionHost mTextSuggestionHost; |
+ |
// Size of the viewport in physical pixels as set from onSizeChanged. |
private int mViewportWidthPix; |
private int mViewportHeightPix; |
@@ -459,6 +462,8 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa |
initPopupZoomer(mContext); |
mImeAdapter = new ImeAdapter( |
mWebContents, mContainerView, new InputMethodManagerWrapper(mContext)); |
+ mTextSuggestionHost = |
+ new TextSuggestionHost(mContext, mWebContents, mContainerView, mRenderCoordinates); |
mImeAdapter.addEventObserver(this); |
mSelectionPopupController = new SelectionPopupController( |
@@ -990,6 +995,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa |
destroyPastePopup(); |
hideSelectPopupWithCancelMessage(); |
mPopupZoomer.hide(false); |
+ mTextSuggestionHost.hidePopups(); |
} |
private void restoreSelectionPopupsIfNecessary() { |
@@ -2128,6 +2134,7 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa |
hidePopupsAndPreserveSelection(); |
showSelectActionMode(); |
} |
+ mTextSuggestionHost.hidePopups(); |
int rotationDegrees = 0; |
switch (rotation) { |