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.app.Activity; | 8 import android.app.Activity; |
9 import android.app.SearchManager; | 9 import android.app.SearchManager; |
10 import android.content.ClipboardManager; | 10 import android.content.ClipboardManager; |
(...skipping 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1677 */ | 1677 */ |
1678 public void onWindowFocusChanged(boolean hasWindowFocus) { | 1678 public void onWindowFocusChanged(boolean hasWindowFocus) { |
1679 if (!hasWindowFocus) resetGestureDetection(); | 1679 if (!hasWindowFocus) resetGestureDetection(); |
1680 } | 1680 } |
1681 | 1681 |
1682 public void onFocusChanged(boolean gainFocus) { | 1682 public void onFocusChanged(boolean gainFocus) { |
1683 if (!gainFocus) { | 1683 if (!gainFocus) { |
1684 hideImeIfNeeded(); | 1684 hideImeIfNeeded(); |
1685 cancelRequestToScrollFocusedEditableNodeIntoView(); | 1685 cancelRequestToScrollFocusedEditableNodeIntoView(); |
1686 } | 1686 } |
1687 if (getPastePopup().isShowing()) | |
jdduke (slow)
2014/07/23 14:35:14
We shouldn't instantiate a new PastePopup (done by
Cyan
2014/07/23 15:41:52
@jdduke:
We are not getting any SelectionEvent aft
| |
1688 mPastePopupMenu.hide(); | |
1687 if (mNativeContentViewCore != 0) nativeSetFocus(mNativeContentViewCore, gainFocus); | 1689 if (mNativeContentViewCore != 0) nativeSetFocus(mNativeContentViewCore, gainFocus); |
1688 } | 1690 } |
1689 | 1691 |
1690 /** | 1692 /** |
1691 * @see View#onKeyUp(int, KeyEvent) | 1693 * @see View#onKeyUp(int, KeyEvent) |
1692 */ | 1694 */ |
1693 public boolean onKeyUp(int keyCode, KeyEvent event) { | 1695 public boolean onKeyUp(int keyCode, KeyEvent event) { |
1694 if (mPopupZoomer.isShowing() && keyCode == KeyEvent.KEYCODE_BACK) { | 1696 if (mPopupZoomer.isShowing() && keyCode == KeyEvent.KEYCODE_BACK) { |
1695 mPopupZoomer.hide(true); | 1697 mPopupZoomer.hide(true); |
1696 return true; | 1698 return true; |
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3228 | 3230 |
3229 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, | 3231 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, |
3230 int x, int y, int w, int h); | 3232 int x, int y, int w, int h); |
3231 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); | 3233 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); |
3232 | 3234 |
3233 private native void nativeResumeResponseDeferredAtStart( | 3235 private native void nativeResumeResponseDeferredAtStart( |
3234 long nativeContentViewCoreImpl); | 3236 long nativeContentViewCoreImpl); |
3235 private native void nativeSetHasPendingNavigationTransitionForTesting( | 3237 private native void nativeSetHasPendingNavigationTransitionForTesting( |
3236 long nativeContentViewCoreImpl); | 3238 long nativeContentViewCoreImpl); |
3237 } | 3239 } |
OLD | NEW |