Index: content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java |
index c52b32457b7907883dd501925ab411e3f2c5b903..f6be5a8a1055dbb0808ec92eea259883da2e5817 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java |
@@ -57,6 +57,8 @@ public class ImeAdapter { |
private static final int COMPOSITION_KEY_CODE = 229; |
+ private static final int DISABLE_CURSOR_UPDATE = 0; |
+ |
/** |
* Interface for the delegate that needs to be notified of IME changes. |
*/ |
@@ -193,7 +195,7 @@ public class ImeAdapter { |
mLastSelectionStart, mLastSelectionEnd, outAttrs)); |
if (DEBUG_LOGS) Log.w(TAG, "onCreateInputConnection: " + mInputConnection); |
if (mCursorAnchorInfoController != null) { |
- mCursorAnchorInfoController.resetMonitoringState(); |
+ onRequestCursorUpdates(DISABLE_CURSOR_UPDATE); |
} |
return mInputConnection; |
} |
@@ -661,6 +663,9 @@ public class ImeAdapter { |
* Notified when IME requested Chrome to change the cursor update mode. |
*/ |
public boolean onRequestCursorUpdates(int cursorUpdateMode) { |
+ if (mNativeImeAdapterAndroid != 0) { |
+ nativeRequestCursorUpdate(mNativeImeAdapterAndroid, cursorUpdateMode); |
+ } |
if (mCursorAnchorInfoController == null) return false; |
return mCursorAnchorInfoController.onRequestCursorUpdates(cursorUpdateMode, |
mViewEmbedder.getAttachedView()); |
@@ -718,7 +723,8 @@ public class ImeAdapter { |
@CalledByNative |
private void setCharacterBounds(float[] characterBounds) { |
if (mCursorAnchorInfoController == null) return; |
- mCursorAnchorInfoController.setCompositionCharacterBounds(characterBounds); |
+ mCursorAnchorInfoController.setCompositionCharacterBounds(characterBounds, |
+ mViewEmbedder.getAttachedView()); |
} |
@CalledByNative |
@@ -750,5 +756,6 @@ public class ImeAdapter { |
int before, int after); |
private native void nativeResetImeAdapter(long nativeImeAdapterAndroid); |
private native boolean nativeRequestTextInputStateUpdate(long nativeImeAdapterAndroid); |
+ private native void nativeRequestCursorUpdate(long nativeImeAdapterAndroid, int mode); |
private native boolean nativeIsImeThreadEnabled(long nativeImeAdapterAndroid); |
} |