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

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

Issue 12218029: Attach ImeAdapter as soon as native side is ready (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « content/browser/android/content_view_core_impl.cc ('k') | no next file » | 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 a5b5039861dc873ecf92e07bf59715a168fb59a9..d1fe462ad3c4c9759cc13ea548f91e839c41899b 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
@@ -1431,11 +1431,6 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
* @see View#dispatchKeyEvent(KeyEvent)
*/
public boolean dispatchKeyEvent(KeyEvent event) {
- if (mImeAdapter != null &&
- !mImeAdapter.isNativeImeAdapterAttached() && mNativeContentViewCore != 0) {
- mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore));
- }
-
if (getContentViewClient().shouldOverrideKeyEvent(event)) {
return mContainerViewInternals.super_dispatchKeyEvent(event);
}
@@ -2072,6 +2067,15 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
}
}
+ @SuppressWarnings("unused")
+ @CalledByNative
+ private void onWebContentsConnected() {
+ if (mImeAdapter != null &&
+ !mImeAdapter.isNativeImeAdapterAttached() && mNativeContentViewCore != 0) {
+ mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore));
+ }
+ }
+
/**
* @return Whether a reload happens when this ContentView is activated.
*/
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698