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

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

Issue 161933002: Show IME when DPAD_CENTER is pressed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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.app.Activity; 7 import android.app.Activity;
8 import android.app.SearchManager; 8 import android.app.SearchManager;
9 import android.content.ContentResolver; 9 import android.content.ContentResolver;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 } 1811 }
1812 1812
1813 /** 1813 /**
1814 * @see View#dispatchKeyEvent(KeyEvent) 1814 * @see View#dispatchKeyEvent(KeyEvent)
1815 */ 1815 */
1816 public boolean dispatchKeyEvent(KeyEvent event) { 1816 public boolean dispatchKeyEvent(KeyEvent event) {
1817 if (getContentViewClient().shouldOverrideKeyEvent(event)) { 1817 if (getContentViewClient().shouldOverrideKeyEvent(event)) {
1818 return mContainerViewInternals.super_dispatchKeyEvent(event); 1818 return mContainerViewInternals.super_dispatchKeyEvent(event);
1819 } 1819 }
1820 1820
1821 if (event.getKeyCode() == KeyEvent.KEYCODE_DPAD_CENTER) {
1822 showImeIfNeeded();
1823 // Not consume it for now, pass it to IME. IME may interpret it as
aurimas (slooooooooow) 2014/02/13 00:43:23 The comment should say: // Event is not consumed h
jdduke (slow) 2014/02/13 00:57:03 Could you also briefly state in the comment that I
1824 // "Enter" key.
1825 }
1826
1821 if (mImeAdapter.dispatchKeyEvent(event)) return true; 1827 if (mImeAdapter.dispatchKeyEvent(event)) return true;
1822 1828
1823 return mContainerViewInternals.super_dispatchKeyEvent(event); 1829 return mContainerViewInternals.super_dispatchKeyEvent(event);
1824 } 1830 }
1825 1831
1826 /** 1832 /**
1827 * @see View#onHoverEvent(MotionEvent) 1833 * @see View#onHoverEvent(MotionEvent)
1828 * Mouse move events are sent on hover enter, hover move and hover exit. 1834 * Mouse move events are sent on hover enter, hover move and hover exit.
1829 * They are sent on hover exit because sometimes it acts as both a hover 1835 * They are sent on hover exit because sometimes it acts as both a hover
1830 * move and hover exit. 1836 * move and hover exit.
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
3473 3479
3474 private native void nativeSendSingleTapUma(long nativeContentViewCoreImpl, 3480 private native void nativeSendSingleTapUma(long nativeContentViewCoreImpl,
3475 int type, int count); 3481 int type, int count);
3476 3482
3477 private native void nativeSendActionAfterDoubleTapUma(long nativeContentView CoreImpl, 3483 private native void nativeSendActionAfterDoubleTapUma(long nativeContentView CoreImpl,
3478 int type, boolean hasDelay, int count); 3484 int type, boolean hasDelay, int count);
3479 3485
3480 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, 3486 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l,
3481 int x, int y, int w, int h); 3487 int x, int y, int w, int h);
3482 } 3488 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698