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

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

Issue 1209243003: Changed the constraints for hiding the top controls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed the client callback to update Editability of the focused node Created 5 years, 6 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 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");
}

Powered by Google App Engine
This is Rietveld 408576698