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

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

Issue 2709633002: Make chrome hide keyboard when opening a new window (Closed)
Patch Set: Add a comment Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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
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 hideKeyboardOnBlur) {
1464 mImeAdapter.onViewFocusChanged(gainFocus); 1464 mImeAdapter.onViewFocusChanged(gainFocus, hideKeyboardOnBlur);
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698