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

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

Issue 2779033004: [Android] Focus/Blur contents when window focus changes (Closed)
Patch Set: Add missing file Created 3 years, 9 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 | « chrome/test/data/android/content_view_focus/content_view_blur_focus.html ('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 4f54ff25e4455c47fa5d73073115f644e5a12b0f..fb0c0bd9df5e93de6f7e263ed412e40308daf709 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
@@ -1335,7 +1335,12 @@ public class ContentViewCore implements AccessibilityStateChangeListener, Displa
*/
public void onWindowFocusChanged(boolean hasWindowFocus) {
mImeAdapter.onWindowFocusChanged(hasWindowFocus);
- if (!hasWindowFocus) resetGestureDetection();
+ if (!hasWindowFocus) {
+ resetGestureDetection();
+ if (hasFocus()) onFocusChanged(false, true /* hideKeyboardOnBlur */);
aelias_OOO_until_Jul13 2017/03/29 21:54:04 This is stacking the effects of the view focus and
mthiesse 2017/03/30 00:49:26 Done.
+ } else {
+ if (hasFocus()) onFocusChanged(true, true /* hideKeyboardOnBlur */);
+ }
Changwan Ryu 2017/03/30 00:05:49 Because ImeAdapter and SelectionPopupController al
mthiesse 2017/03/30 00:12:45 Thanks, that's essentially what I'm writing now.
mthiesse 2017/03/30 00:49:26 Done.
mSelectionPopupController.onWindowFocusChanged(hasWindowFocus);
for (mGestureStateListenersIterator.rewind(); mGestureStateListenersIterator.hasNext();) {
mGestureStateListenersIterator.next().onWindowFocusChanged(hasWindowFocus);
« no previous file with comments | « chrome/test/data/android/content_view_focus/content_view_blur_focus.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698