OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
9 import android.app.assist.AssistStructure.ViewNode; | 9 import android.app.assist.AssistStructure.ViewNode; |
10 import android.content.ClipData; | 10 import android.content.ClipData; |
(...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1328 // Zero-ing the rect will prevent |updateAfterSizeChanged()| from | 1328 // Zero-ing the rect will prevent |updateAfterSizeChanged()| from |
1329 // issuing the delayed form focus event. | 1329 // issuing the delayed form focus event. |
1330 mFocusPreOSKViewportRect.setEmpty(); | 1330 mFocusPreOSKViewportRect.setEmpty(); |
1331 } | 1331 } |
1332 | 1332 |
1333 /** | 1333 /** |
1334 * @see View#onWindowFocusChanged(boolean) | 1334 * @see View#onWindowFocusChanged(boolean) |
1335 */ | 1335 */ |
1336 public void onWindowFocusChanged(boolean hasWindowFocus) { | 1336 public void onWindowFocusChanged(boolean hasWindowFocus) { |
1337 mImeAdapter.onWindowFocusChanged(hasWindowFocus); | 1337 mImeAdapter.onWindowFocusChanged(hasWindowFocus); |
1338 if (!hasWindowFocus) resetGestureDetection(); | 1338 if (!hasWindowFocus) { |
1339 resetGestureDetection(); | |
1340 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.
| |
1341 } else { | |
1342 if (hasFocus()) onFocusChanged(true, true /* hideKeyboardOnBlur */); | |
1343 } | |
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.
| |
1339 mSelectionPopupController.onWindowFocusChanged(hasWindowFocus); | 1344 mSelectionPopupController.onWindowFocusChanged(hasWindowFocus); |
1340 for (mGestureStateListenersIterator.rewind(); mGestureStateListenersIter ator.hasNext();) { | 1345 for (mGestureStateListenersIterator.rewind(); mGestureStateListenersIter ator.hasNext();) { |
1341 mGestureStateListenersIterator.next().onWindowFocusChanged(hasWindow Focus); | 1346 mGestureStateListenersIterator.next().onWindowFocusChanged(hasWindow Focus); |
1342 } | 1347 } |
1343 } | 1348 } |
1344 | 1349 |
1345 public void onFocusChanged(boolean gainFocus, boolean hideKeyboardOnBlur) { | 1350 public void onFocusChanged(boolean gainFocus, boolean hideKeyboardOnBlur) { |
1346 mImeAdapter.onViewFocusChanged(gainFocus, hideKeyboardOnBlur); | 1351 mImeAdapter.onViewFocusChanged(gainFocus, hideKeyboardOnBlur); |
1347 | 1352 |
1348 // Used in test that bypasses initialize(). | 1353 // Used in test that bypasses initialize(). |
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2676 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l, | 2681 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l, |
2677 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily, | 2682 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily, |
2678 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor, | 2683 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor, |
2679 String textTrackTextShadow, String textTrackTextSize); | 2684 String textTrackTextShadow, String textTrackTextSize); |
2680 | 2685 |
2681 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); | 2686 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); |
2682 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo reImpl); | 2687 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo reImpl); |
2683 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac tion, int x, int y, | 2688 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac tion, int x, int y, |
2684 int screenX, int screenY, String[] mimeTypes, String content); | 2689 int screenX, int screenY, String[] mimeTypes, String content); |
2685 } | 2690 } |
OLD | NEW |