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

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

Issue 12262016: Adding IME test changes to make it easier to test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed Ted's nits 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
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1e4046ee7669711b041daafc1fd1f6c98ce3e5cd..d73b66e25f26d8a1662ec266862f686105369ae1 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;
@@ -285,6 +287,7 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
WeakContext.initializeWeakContext(context);
mPersonality = personality;
HeapStatsLogger.init(mContext.getApplicationContext());
+ mAdapterInputConnectionFactory = new AdapterInputConnectionFactory();
}
/**
@@ -333,6 +336,11 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
}
@VisibleForTesting
+ protected void setAdapterInputConnectionFactory(AdapterInputConnectionFactory factory) {
+ mAdapterInputConnectionFactory = factory;
+ }
+
+ @VisibleForTesting
protected ImeAdapter.AdapterInputConnection getInputConnectionForTest() {
return mInputConnection;
}
@@ -1227,8 +1235,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;
}
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698