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.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 Loading... | |
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 Loading... | |
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 } |
OLD | NEW |