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

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

Issue 24195023: Switch to sending IME selection updates early. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ted's nits Created 7 years, 3 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 1053e1ca8b1fbfb4c7666efba393eca5cbd4c1e7..3378251ff8334a93eb0c296ed12a0c4e14b55af8 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
@@ -2395,11 +2395,10 @@ import java.util.Map;
getContentViewClient().onGeometryChanged(-1, null);
}
- @SuppressWarnings("unused")
@CalledByNative
private void updateImeAdapter(int nativeImeAdapterAndroid, int textInputType,
String text, int selectionStart, int selectionEnd,
- int compositionStart, int compositionEnd, boolean showImeIfNeeded) {
+ int compositionStart, int compositionEnd, boolean showImeIfNeeded, boolean requireAck) {
TraceEvent.begin();
mSelectionEditable = (textInputType != ImeAdapter.getTextInputTypeNone());
@@ -2409,21 +2408,14 @@ import java.util.Map;
selectionStart, selectionEnd, showImeIfNeeded);
if (mInputConnection != null) {
- mInputConnection.setEditableText(text, selectionStart, selectionEnd,
- compositionStart, compositionEnd);
+ mInputConnection.updateState(text, selectionStart, selectionEnd, compositionStart,
+ compositionEnd, requireAck);
}
TraceEvent.end();
}
@SuppressWarnings("unused")
@CalledByNative
- private void processImeBatchStateAck(boolean isBegin) {
- if (mInputConnection == null) return;
- mInputConnection.setIgnoreTextInputStateUpdates(isBegin);
- }
-
- @SuppressWarnings("unused")
- @CalledByNative
private void setTitle(String title) {
getContentViewClient().onUpdateTitle(title);
}
@@ -2923,6 +2915,7 @@ import java.util.Map;
if (mAccessibilityScriptInjectionObserver == null) {
ContentObserver contentObserver = new ContentObserver(new Handler()) {
+ @Override
public void onChange(boolean selfChange, Uri uri) {
setAccessibilityState(mAccessibilityManager.isEnabled());
}

Powered by Google App Engine
This is Rietveld 408576698