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

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

Issue 411553002: Hide the PopupZoomer when input is received from IME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.app.Activity; 8 import android.app.Activity;
9 import android.app.SearchManager; 9 import android.app.SearchManager;
10 import android.content.ContentResolver; 10 import android.content.ContentResolver;
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 @VisibleForTesting 541 @VisibleForTesting
542 public AdapterInputConnection getInputConnectionForTest() { 542 public AdapterInputConnection getInputConnectionForTest() {
543 return mInputConnection; 543 return mInputConnection;
544 } 544 }
545 545
546 private ImeAdapter createImeAdapter(Context context) { 546 private ImeAdapter createImeAdapter(Context context) {
547 return new ImeAdapter(mInputMethodManagerWrapper, 547 return new ImeAdapter(mInputMethodManagerWrapper,
548 new ImeAdapter.ImeAdapterDelegate() { 548 new ImeAdapter.ImeAdapterDelegate() {
549 @Override 549 @Override
550 public void onImeEvent(boolean isFinish) { 550 public void onImeEvent(boolean isFinish) {
551 if (mPopupZoomer.isShowing()) {
jdduke (slow) 2014/07/23 14:39:31 I'll defer to aurimas@ here, as I don't understand
aurimas (slooooooooow) 2014/07/25 21:09:31 I dont think we need to check for isFinish. I thin
552 mPopupZoomer.hide(true);
553 }
551 getContentViewClient().onImeEvent(); 554 getContentViewClient().onImeEvent();
552 if (!isFinish) { 555 if (!isFinish) {
553 hideHandles(); 556 hideHandles();
554 } 557 }
555 } 558 }
556 559
557 @Override 560 @Override
558 public void onDismissInput() { 561 public void onDismissInput() {
559 getContentViewClient().onImeStateChangeRequested(false); 562 getContentViewClient().onImeStateChangeRequested(false);
560 } 563 }
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 cancelRequestToScrollFocusedEditableNodeIntoView(); 1703 cancelRequestToScrollFocusedEditableNodeIntoView();
1701 } 1704 }
1702 if (mNativeContentViewCore != 0) nativeSetFocus(mNativeContentViewCore, gainFocus); 1705 if (mNativeContentViewCore != 0) nativeSetFocus(mNativeContentViewCore, gainFocus);
1703 } 1706 }
1704 1707
1705 /** 1708 /**
1706 * @see View#onKeyUp(int, KeyEvent) 1709 * @see View#onKeyUp(int, KeyEvent)
1707 */ 1710 */
1708 public boolean onKeyUp(int keyCode, KeyEvent event) { 1711 public boolean onKeyUp(int keyCode, KeyEvent event) {
1709 if (mPopupZoomer.isShowing() && keyCode == KeyEvent.KEYCODE_BACK) { 1712 if (mPopupZoomer.isShowing() && keyCode == KeyEvent.KEYCODE_BACK) {
1710 mPopupZoomer.hide(true); 1713 mPopupZoomer.hide(true);
jdduke (slow) 2014/07/23 14:39:31 Do we still need this call if we always hide the p
1711 return true; 1714 return true;
1712 } 1715 }
1713 return mContainerViewInternals.super_onKeyUp(keyCode, event); 1716 return mContainerViewInternals.super_onKeyUp(keyCode, event);
1714 } 1717 }
1715 1718
1716 /** 1719 /**
1717 * @see View#dispatchKeyEventPreIme(KeyEvent) 1720 * @see View#dispatchKeyEventPreIme(KeyEvent)
1718 */ 1721 */
1719 public boolean dispatchKeyEventPreIme(KeyEvent event) { 1722 public boolean dispatchKeyEventPreIme(KeyEvent event) {
1720 try { 1723 try {
(...skipping 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after
3387 3390
3388 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, 3391 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l,
3389 int x, int y, int w, int h); 3392 int x, int y, int w, int h);
3390 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); 3393 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque);
3391 3394
3392 private native void nativeResumeResponseDeferredAtStart( 3395 private native void nativeResumeResponseDeferredAtStart(
3393 long nativeContentViewCoreImpl); 3396 long nativeContentViewCoreImpl);
3394 private native void nativeSetHasPendingNavigationTransitionForTesting( 3397 private native void nativeSetHasPendingNavigationTransitionForTesting(
3395 long nativeContentViewCoreImpl); 3398 long nativeContentViewCoreImpl);
3396 } 3399 }
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698