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

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

Issue 2476883003: Revert of Allow selection change update before beginBatchEdit (Closed)
Patch Set: fixed build Created 4 years, 1 month 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/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 b8f0cd6029e1de64ae97bf94c5dc78c16eb65a0b..a51a562fd9cc6affced76f04360058d50474dcb3 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
@@ -306,10 +306,9 @@ public class ImeAdapter {
* @param compositionEnd The character offset of the composition end, or -1 if there is no
* selection.
* @param isNonImeChange True when the update was caused by non-IME (e.g. Javascript).
- * @param inBatchEditMode True when in batch edit mode.
*/
public void updateState(String text, int selectionStart, int selectionEnd, int compositionStart,
- int compositionEnd, boolean isNonImeChange, boolean inBatchEditMode) {
+ int compositionEnd, boolean isNonImeChange) {
if (mCursorAnchorInfoController != null && (!TextUtils.equals(mLastText, text)
|| mLastSelectionStart != selectionStart || mLastSelectionEnd != selectionEnd
|| mLastCompositionStart != compositionStart
@@ -326,7 +325,7 @@ public class ImeAdapter {
boolean singleLine = mTextInputType != TextInputType.TEXT_AREA
&& mTextInputType != TextInputType.CONTENT_EDITABLE;
mInputConnection.updateStateOnUiThread(text, selectionStart, selectionEnd, compositionStart,
- compositionEnd, singleLine, isNonImeChange, inBatchEditMode);
+ compositionEnd, singleLine, isNonImeChange);
}
/**
@@ -681,25 +680,6 @@ public class ImeAdapter {
}
/**
- * Send a request to the native counterpart to begin batch edit.
- */
- boolean beginBatchEdit() {
- if (mNativeImeAdapterAndroid == 0) return false;
- if (mInputConnection == null) return false;
- return nativeBeginBatchEdit(mNativeImeAdapterAndroid);
- }
-
- /**
- * Send a request to the native counterpart to end batch edit.
- */
- boolean endBatchEdit() {
- if (mNativeImeAdapterAndroid == 0) return false;
- // You won't get state update anyways.
- if (mInputConnection == null) return false;
- return nativeEndBatchEdit(mNativeImeAdapterAndroid);
- }
-
- /**
* Notified when IME requested Chrome to change the cursor update mode.
*/
public boolean onRequestCursorUpdates(int cursorUpdateMode) {
@@ -799,10 +779,7 @@ public class ImeAdapter {
private native void nativeDeleteSurroundingText(long nativeImeAdapterAndroid,
int before, int after);
private native void nativeResetImeAdapter(long nativeImeAdapterAndroid);
- private native boolean nativeRequestTextInputStateUpdate(
- long nativeImeAdapterAndroid);
- private native boolean nativeBeginBatchEdit(long nativeImeAdapterAndroid);
- private native boolean nativeEndBatchEdit(long nativeImeAdapterAndroid);
+ private native boolean nativeRequestTextInputStateUpdate(long nativeImeAdapterAndroid);
private native void nativeRequestCursorUpdate(long nativeImeAdapterAndroid,
boolean immediateRequest, boolean monitorRequest);
private native boolean nativeIsImeThreadEnabled(long nativeImeAdapterAndroid);

Powered by Google App Engine
This is Rietveld 408576698