| 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 f1854d0f9053ab2ec3dd89e7e90a62be8efac59c..445312965ac5a6be50d33a5e9662be89582bf1ad 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
|
| @@ -483,8 +483,8 @@ public class ContentViewCore
|
| }
|
|
|
| private ImeAdapter createImeAdapter() {
|
| - return new ImeAdapter(
|
| - new InputMethodManagerWrapper(mContext), new ImeAdapter.ImeAdapterDelegate() {
|
| + return new ImeAdapter(mWebContents, new InputMethodManagerWrapper(mContext),
|
| + new ImeAdapter.ImeAdapterDelegate() {
|
| @Override
|
| public void onImeEvent() {
|
| mPopupZoomer.hide(true);
|
| @@ -569,10 +569,9 @@ public class ContentViewCore
|
|
|
| initPopupZoomer(mContext);
|
| mImeAdapter = createImeAdapter();
|
| - attachImeAdapter();
|
|
|
| mSelectionPopupController = new SelectionPopupController(mContext, windowAndroid,
|
| - webContents, viewDelegate.getContainerView(), mRenderCoordinates, mImeAdapter);
|
| + webContents, viewDelegate.getContainerView(), mRenderCoordinates);
|
| mSelectionPopupController.setCallback(ActionModeCallbackHelper.EMPTY_CALLBACK);
|
| mSelectionPopupController.setContainerView(getContainerView());
|
|
|
| @@ -1771,16 +1770,14 @@ public class ContentViewCore
|
| }
|
|
|
| @CalledByNative
|
| - private void updateImeAdapter(long nativeImeAdapterAndroid, int textInputType,
|
| - int textInputFlags, int textInputMode, String text, int selectionStart,
|
| - int selectionEnd, int compositionStart, int compositionEnd, boolean showImeIfNeeded,
|
| - boolean replyToRequest) {
|
| + private void updateImeAdapter(int textInputType, int textInputFlags, int textInputMode,
|
| + String text, int selectionStart, int selectionEnd, int compositionStart,
|
| + int compositionEnd, boolean showImeIfNeeded, boolean replyToRequest) {
|
| try {
|
| TraceEvent.begin("ContentViewCore.updateImeAdapter");
|
| boolean focusedNodeEditable = (textInputType != TextInputType.NONE);
|
| boolean focusedNodeIsPassword = (textInputType == TextInputType.PASSWORD);
|
|
|
| - mImeAdapter.attach(nativeImeAdapterAndroid);
|
| mImeAdapter.updateState(textInputType, textInputFlags, textInputMode, showImeIfNeeded,
|
| text, selectionStart, selectionEnd, compositionStart, compositionEnd,
|
| replyToRequest);
|
| @@ -1799,11 +1796,6 @@ public class ContentViewCore
|
| }
|
| }
|
|
|
| - @CalledByNative
|
| - private void forceUpdateImeAdapter(long nativeImeAdapterAndroid) {
|
| - mImeAdapter.attach(nativeImeAdapterAndroid);
|
| - }
|
| -
|
| /**
|
| * Called (from native) when the <select> popup needs to be shown.
|
| * @param anchorView View anchored for popup.
|
| @@ -1914,21 +1906,11 @@ public class ContentViewCore
|
| @SuppressWarnings("unused")
|
| @CalledByNative
|
| private void onRenderProcessChange() {
|
| - attachImeAdapter();
|
| // Immediately sync closed caption settings to the new render process.
|
| mSystemCaptioningBridge.syncToListener(this);
|
| }
|
|
|
| /**
|
| - * Attaches the native ImeAdapter object to the java ImeAdapter to allow communication via JNI.
|
| - */
|
| - public void attachImeAdapter() {
|
| - if (mImeAdapter != null && mNativeContentViewCore != 0) {
|
| - mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore));
|
| - }
|
| - }
|
| -
|
| - /**
|
| * @see View#hasFocus()
|
| */
|
| @CalledByNative
|
| @@ -2649,9 +2631,6 @@ public class ContentViewCore
|
| private native void nativeSelectPopupMenuItems(long nativeContentViewCoreImpl,
|
| long nativeSelectPopupSourceFrame, int[] indices);
|
|
|
| -
|
| - private native long nativeGetNativeImeAdapter(long nativeContentViewCoreImpl);
|
| -
|
| private native int nativeGetCurrentRenderProcessId(long nativeContentViewCoreImpl);
|
|
|
| private native void nativeSetAllowJavascriptInterfacesInspection(
|
|
|