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

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

Issue 12093068: Adding missing UpdateTextInputState calls after each ime event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding an Android IME test Created 7 years, 10 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 a5b5039861dc873ecf92e07bf59715a168fb59a9..aff2b42588eb0fdd561106fb79ae51012458e98a 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
@@ -44,6 +44,7 @@ import org.chromium.base.JNINamespace;
import org.chromium.base.WeakContext;
import org.chromium.content.R;
import org.chromium.content.browser.ContentViewGestureHandler.MotionEventDelegate;
+import org.chromium.content.browser.ImeAdapter.AdapterInputConnectionFactory;
import org.chromium.content.browser.accessibility.AccessibilityInjector;
import org.chromium.content.common.ProcessInitException;
import org.chromium.content.common.TraceEvent;
@@ -211,6 +212,7 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
// Only valid when focused on a text / password field.
private ImeAdapter mImeAdapter;
+ private ImeAdapter.AdapterInputConnectionFactory mAdapterInputConnectionFactory;
private ImeAdapter.AdapterInputConnection mInputConnection;
private SelectionHandleController mSelectionHandleController;
@@ -322,6 +324,7 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
WeakContext.initializeWeakContext(context);
mPersonality = personality;
HeapStatsLogger.init(mContext.getApplicationContext());
+ mAdapterInputConnectionFactory = new AdapterInputConnectionFactory();
}
/**
@@ -370,6 +373,11 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
}
@VisibleForTesting
+ protected void setAdapterInputConnectionFactory(AdapterInputConnectionFactory factory) {
+ mAdapterInputConnectionFactory = factory;
+ }
+
+ @VisibleForTesting
protected ImeAdapter.AdapterInputConnection getInputConnectionForTest() {
return mInputConnection;
}
@@ -1266,8 +1274,8 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
// enter fullscreen mode.
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN;
}
- mInputConnection = ImeAdapter.AdapterInputConnection.getInstance(
- mContainerView, mImeAdapter, outAttrs);
+ mInputConnection =
+ mAdapterInputConnectionFactory.get(mContainerView, mImeAdapter, outAttrs);
return mInputConnection;
}

Powered by Google App Engine
This is Rietveld 408576698