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.Activity; | 9 import android.app.Activity; |
10 import android.app.SearchManager; | 10 import android.app.SearchManager; |
(...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 } finally { | 1687 } finally { |
1688 TraceEvent.end("ContentViewCore.dispatchKeyEventPreIme"); | 1688 TraceEvent.end("ContentViewCore.dispatchKeyEventPreIme"); |
1689 } | 1689 } |
1690 } | 1690 } |
1691 | 1691 |
1692 /** | 1692 /** |
1693 * @see View#dispatchKeyEvent(KeyEvent) | 1693 * @see View#dispatchKeyEvent(KeyEvent) |
1694 */ | 1694 */ |
1695 public boolean dispatchKeyEvent(KeyEvent event) { | 1695 public boolean dispatchKeyEvent(KeyEvent event) { |
1696 if (GamepadList.dispatchKeyEvent(event)) return true; | 1696 if (GamepadList.dispatchKeyEvent(event)) return true; |
| 1697 if (event.getKeyCode() == KeyEvent.KEYCODE_BUTTON_A) { |
| 1698 nativeSimulateClick(mNativeContentViewCore); |
| 1699 return true; |
| 1700 } |
1697 if (getContentViewClient().shouldOverrideKeyEvent(event)) { | 1701 if (getContentViewClient().shouldOverrideKeyEvent(event)) { |
1698 return mContainerViewInternals.super_dispatchKeyEvent(event); | 1702 return mContainerViewInternals.super_dispatchKeyEvent(event); |
1699 } | 1703 } |
1700 | 1704 |
1701 if (mImeAdapter.dispatchKeyEvent(event)) return true; | 1705 if (mImeAdapter.dispatchKeyEvent(event)) return true; |
1702 | 1706 |
1703 return mContainerViewInternals.super_dispatchKeyEvent(event); | 1707 return mContainerViewInternals.super_dispatchKeyEvent(event); |
1704 } | 1708 } |
1705 | 1709 |
1706 /** | 1710 /** |
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3434 int androidToolType0, int androidToolType1, | 3438 int androidToolType0, int androidToolType1, |
3435 int androidButtonState, int androidMetaState, | 3439 int androidButtonState, int androidMetaState, |
3436 boolean isTouchHandleEvent); | 3440 boolean isTouchHandleEvent); |
3437 | 3441 |
3438 private native int nativeSendMouseMoveEvent( | 3442 private native int nativeSendMouseMoveEvent( |
3439 long nativeContentViewCoreImpl, long timeMs, float x, float y, int t
oolType); | 3443 long nativeContentViewCoreImpl, long timeMs, float x, float y, int t
oolType); |
3440 | 3444 |
3441 private native int nativeSendMouseWheelEvent(long nativeContentViewCoreImpl,
long timeMs, | 3445 private native int nativeSendMouseWheelEvent(long nativeContentViewCoreImpl,
long timeMs, |
3442 float x, float y, float ticksX, float ticksY, float pixelsPerTick); | 3446 float x, float y, float ticksX, float ticksY, float pixelsPerTick); |
3443 | 3447 |
| 3448 private native void nativeSimulateClick(long nativeContentViewCoreImpl); |
| 3449 |
3444 private native void nativeScrollBegin(long nativeContentViewCoreImpl, long t
imeMs, float x, | 3450 private native void nativeScrollBegin(long nativeContentViewCoreImpl, long t
imeMs, float x, |
3445 float y, float hintX, float hintY, boolean targetViewport); | 3451 float y, float hintX, float hintY, boolean targetViewport); |
3446 | 3452 |
3447 private native void nativeScrollEnd(long nativeContentViewCoreImpl, long tim
eMs); | 3453 private native void nativeScrollEnd(long nativeContentViewCoreImpl, long tim
eMs); |
3448 | 3454 |
3449 private native void nativeScrollBy( | 3455 private native void nativeScrollBy( |
3450 long nativeContentViewCoreImpl, long timeMs, float x, float y, | 3456 long nativeContentViewCoreImpl, long timeMs, float x, float y, |
3451 float deltaX, float deltaY); | 3457 float deltaX, float deltaY); |
3452 | 3458 |
3453 private native void nativeFlingStart(long nativeContentViewCoreImpl, long ti
meMs, float x, | 3459 private native void nativeFlingStart(long nativeContentViewCoreImpl, long ti
meMs, float x, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3512 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, | 3518 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp
l, |
3513 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, | 3519 boolean textTracksEnabled, String textTrackBackgroundColor, String t
extTrackFontFamily, |
3514 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, | 3520 String textTrackFontStyle, String textTrackFontVariant, String textT
rackTextColor, |
3515 String textTrackTextShadow, String textTrackTextSize); | 3521 String textTrackTextShadow, String textTrackTextSize); |
3516 | 3522 |
3517 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3523 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
3518 int x, int y, int w, int h); | 3524 int x, int y, int w, int h); |
3519 | 3525 |
3520 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3526 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
3521 } | 3527 } |
OLD | NEW |