Chromium Code Reviews| Index: content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java |
| diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java |
| index 930afc0edbdb982daf9482aacb1c705ab2e3c5f3..cb819a931b7d707b585c579eb9ae66aef298335c 100644 |
| --- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java |
| +++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java |
| @@ -416,7 +416,7 @@ public class ImeAdapter { |
| } |
| /** |
| - * Call this when view is detached from window |
| + * Call this when view is attached to window. |
| */ |
| public void onViewAttachedToWindow() { |
| if (mInputConnectionFactory != null) { |
| @@ -425,7 +425,7 @@ public class ImeAdapter { |
| } |
| /** |
| - * Call this when view is detached from window |
| + * Call this when view is detached from window. |
| */ |
| public void onViewDetachedFromWindow() { |
| resetAndHideKeyboard(); |
| @@ -437,9 +437,11 @@ public class ImeAdapter { |
| /** |
| * Call this when view's focus has changed. |
| * @param gainFocus True if we're gaining focus. |
| + * @param hideKeyboardIfNeeded True if we should hide soft keyboard when losing focus. |
|
Changwan Ryu
2017/02/21 05:16:39
how about renaming this to hideKeyboardOnBlur?
yabinh
2017/02/21 06:18:31
Done.
|
| */ |
| - public void onViewFocusChanged(boolean gainFocus) { |
| + public void onViewFocusChanged(boolean gainFocus, boolean hideKeyboardIfNeeded) { |
| if (DEBUG_LOGS) Log.w(TAG, "onViewFocusChanged: gainFocus [%b]", gainFocus); |
| + if (!gainFocus && hideKeyboardIfNeeded) resetAndHideKeyboard(); |
| if (mInputConnectionFactory != null) { |
| mInputConnectionFactory.onViewFocusChanged(gainFocus); |
| } |