| 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 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 */ | 1453 */ |
| 1454 public void onWindowFocusChanged(boolean hasWindowFocus) { | 1454 public void onWindowFocusChanged(boolean hasWindowFocus) { |
| 1455 mImeAdapter.onWindowFocusChanged(hasWindowFocus); | 1455 mImeAdapter.onWindowFocusChanged(hasWindowFocus); |
| 1456 if (!hasWindowFocus) resetGestureDetection(); | 1456 if (!hasWindowFocus) resetGestureDetection(); |
| 1457 mSelectionPopupController.onWindowFocusChanged(hasWindowFocus); | 1457 mSelectionPopupController.onWindowFocusChanged(hasWindowFocus); |
| 1458 for (mGestureStateListenersIterator.rewind(); mGestureStateListenersIter
ator.hasNext();) { | 1458 for (mGestureStateListenersIterator.rewind(); mGestureStateListenersIter
ator.hasNext();) { |
| 1459 mGestureStateListenersIterator.next().onWindowFocusChanged(hasWindow
Focus); | 1459 mGestureStateListenersIterator.next().onWindowFocusChanged(hasWindow
Focus); |
| 1460 } | 1460 } |
| 1461 } | 1461 } |
| 1462 | 1462 |
| 1463 public void onFocusChanged(boolean gainFocus) { | 1463 public void onFocusChanged(boolean gainFocus, boolean hideKeyboardIfNeeded)
{ |
| 1464 mImeAdapter.onViewFocusChanged(gainFocus); | 1464 mImeAdapter.onViewFocusChanged(gainFocus, hideKeyboardIfNeeded); |
| 1465 | 1465 |
| 1466 // Used in test that bypasses initialize(). | 1466 // Used in test that bypasses initialize(). |
| 1467 if (mJoystickScrollProvider != null) { | 1467 if (mJoystickScrollProvider != null) { |
| 1468 mJoystickScrollProvider.setEnabled(gainFocus && !isFocusedNodeEditab
le()); | 1468 mJoystickScrollProvider.setEnabled(gainFocus && !isFocusedNodeEditab
le()); |
| 1469 } | 1469 } |
| 1470 | 1470 |
| 1471 if (gainFocus) { | 1471 if (gainFocus) { |
| 1472 restoreSelectionPopupsIfNecessary(); | 1472 restoreSelectionPopupsIfNecessary(); |
| 1473 } else { | 1473 } else { |
| 1474 cancelRequestToScrollFocusedEditableNodeIntoView(); | 1474 cancelRequestToScrollFocusedEditableNodeIntoView(); |
| (...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2834 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, | 2834 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, |
| 2835 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, | 2835 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, |
| 2836 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, | 2836 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, |
| 2837 String textTrackTextShadow, String textTrackTextSize); | 2837 String textTrackTextShadow, String textTrackTextSize); |
| 2838 | 2838 |
| 2839 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 2839 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
| 2840 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo
reImpl); | 2840 private native boolean nativeIsTouchDragDropEnabled(long nativeContentViewCo
reImpl); |
| 2841 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac
tion, int x, int y, | 2841 private native void nativeOnDragEvent(long nativeContentViewCoreImpl, int ac
tion, int x, int y, |
| 2842 int screenX, int screenY, String[] mimeTypes, String content); | 2842 int screenX, int screenY, String[] mimeTypes, String content); |
| 2843 } | 2843 } |
| OLD | NEW |