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

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

Issue 2931443003: Add support for Android spellcheck menu in Chrome/WebViews (Closed)
Patch Set: Actually split off LayoutTheme changes Created 3 years, 6 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 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) {

Powered by Google App Engine
This is Rietveld 408576698