Chromium Code Reviews| 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 780201fa42b75a9e352640f89b80b2f637855ffe..83e925fb576f9632561aa81c5d1dc976350e616b 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 |
| @@ -743,7 +743,6 @@ public class ContentViewCore implements |
| @Override |
| public void onDismissInput() { |
|
jdduke (slow)
2015/07/01 16:02:04
Can we then get rid of this delegate method entire
raghu
2015/07/01 17:16:57
Acknowledged.
|
| - getContentViewClient().onImeStateChangeRequested(false); |
| } |
| @Override |
| @@ -783,9 +782,6 @@ public class ContentViewCore implements |
| return new ResultReceiver(new Handler()) { |
| @Override |
| public void onReceiveResult(int resultCode, Bundle resultData) { |
| - getContentViewClient().onImeStateChangeRequested( |
| - resultCode == InputMethodManager.RESULT_SHOWN |
| - || resultCode == InputMethodManager.RESULT_UNCHANGED_SHOWN); |
| if (resultCode == InputMethodManager.RESULT_SHOWN) { |
| // If OSK is newly shown, delay the form focus until |
| // the onSizeChanged (in order to adjust relative to the |
| @@ -2296,14 +2292,10 @@ public class ContentViewCore implements |
| // because ImeAdapter does so asynchronouly with a delay, and |
| // by the time when ImeAdapter dismisses the input, the |
| // containerView may have lost focus. |
| - // We cannot trust ContentViewClient#onImeStateChangeRequested to |
| - // hide the input window because it has an empty default implementation. |
| - // So we need to explicitly hide the input method window here. |
| if (mInputMethodManagerWrapper.isActive(mContainerView)) { |
| mInputMethodManagerWrapper.hideSoftInputFromWindow( |
| mContainerView.getWindowToken(), 0, null); |
| } |
| - getContentViewClient().onImeStateChangeRequested(false); |
| } |
| @SuppressWarnings("unused") |
| @@ -2391,8 +2383,8 @@ public class ContentViewCore implements |
| boolean isNonImeChange) { |
| try { |
| TraceEvent.begin("ContentViewCore.updateImeAdapter"); |
| - mFocusedNodeEditable = (textInputType != TextInputType.NONE); |
| - if (!mFocusedNodeEditable) hidePastePopup(); |
| + boolean focusedNodeEditable = (textInputType != TextInputType.NONE); |
| + if (!focusedNodeEditable) hidePastePopup(); |
| mImeAdapter.updateKeyboardVisibility( |
| nativeImeAdapterAndroid, textInputType, textInputFlags, showImeIfNeeded); |
| @@ -2403,6 +2395,11 @@ public class ContentViewCore implements |
| } |
| if (mActionMode != null) mActionMode.invalidate(); |
| + |
| + if (focusedNodeEditable != mFocusedNodeEditable) { |
| + mFocusedNodeEditable = focusedNodeEditable; |
| + getContentViewClient().onFocusedNodeEditabilityChanged(mFocusedNodeEditable); |
| + } |
| } finally { |
| TraceEvent.end("ContentViewCore.updateImeAdapter"); |
| } |