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 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 final boolean consumed = nativeOnTouchEvent(mNativeContentViewCore,
event, | 1168 final boolean consumed = nativeOnTouchEvent(mNativeContentViewCore,
event, |
1169 event.getEventTime(), eventAction, | 1169 event.getEventTime(), eventAction, |
1170 pointerCount, event.getHistorySize(), event.getActionIndex()
, | 1170 pointerCount, event.getHistorySize(), event.getActionIndex()
, |
1171 event.getX(), event.getY(), | 1171 event.getX(), event.getY(), |
1172 pointerCount > 1 ? event.getX(1) : 0, | 1172 pointerCount > 1 ? event.getX(1) : 0, |
1173 pointerCount > 1 ? event.getY(1) : 0, | 1173 pointerCount > 1 ? event.getY(1) : 0, |
1174 event.getPointerId(0), pointerCount > 1 ? event.getPointerId
(1) : -1, | 1174 event.getPointerId(0), pointerCount > 1 ? event.getPointerId
(1) : -1, |
1175 event.getTouchMajor(), pointerCount > 1 ? event.getTouchMajo
r(1) : 0, | 1175 event.getTouchMajor(), pointerCount > 1 ? event.getTouchMajo
r(1) : 0, |
1176 event.getTouchMinor(), pointerCount > 1 ? event.getTouchMino
r(1) : 0, | 1176 event.getTouchMinor(), pointerCount > 1 ? event.getTouchMino
r(1) : 0, |
1177 event.getOrientation(), pointerCount > 1 ? event.getOrientat
ion(1) : 0, | 1177 event.getOrientation(), pointerCount > 1 ? event.getOrientat
ion(1) : 0, |
| 1178 event.getAxisValue(MotionEvent.AXIS_TILT), |
| 1179 pointerCount > 1 ? event.getAxisValue(MotionEvent.AXIS_TILT,
1) : 0, |
1178 event.getRawX(), event.getRawY(), | 1180 event.getRawX(), event.getRawY(), |
1179 event.getToolType(0), | 1181 event.getToolType(0), |
1180 pointerCount > 1 ? event.getToolType(1) : MotionEvent.TOOL_T
YPE_UNKNOWN, | 1182 pointerCount > 1 ? event.getToolType(1) : MotionEvent.TOOL_T
YPE_UNKNOWN, |
1181 event.getButtonState(), | 1183 event.getButtonState(), |
1182 event.getMetaState(), | 1184 event.getMetaState(), |
1183 isTouchHandleEvent); | 1185 isTouchHandleEvent); |
1184 | 1186 |
1185 if (offset != null) offset.recycle(); | 1187 if (offset != null) offset.recycle(); |
1186 return consumed; | 1188 return consumed; |
1187 } finally { | 1189 } finally { |
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3114 | 3116 |
3115 // All touch events (including flings, scrolls etc) accept coordinates in ph
ysical pixels. | 3117 // All touch events (including flings, scrolls etc) accept coordinates in ph
ysical pixels. |
3116 private native boolean nativeOnTouchEvent( | 3118 private native boolean nativeOnTouchEvent( |
3117 long nativeContentViewCoreImpl, MotionEvent event, | 3119 long nativeContentViewCoreImpl, MotionEvent event, |
3118 long timeMs, int action, int pointerCount, int historySize, int acti
onIndex, | 3120 long timeMs, int action, int pointerCount, int historySize, int acti
onIndex, |
3119 float x0, float y0, float x1, float y1, | 3121 float x0, float y0, float x1, float y1, |
3120 int pointerId0, int pointerId1, | 3122 int pointerId0, int pointerId1, |
3121 float touchMajor0, float touchMajor1, | 3123 float touchMajor0, float touchMajor1, |
3122 float touchMinor0, float touchMinor1, | 3124 float touchMinor0, float touchMinor1, |
3123 float orientation0, float orientation1, | 3125 float orientation0, float orientation1, |
| 3126 float tilt0, float tilt1, |
3124 float rawX, float rawY, | 3127 float rawX, float rawY, |
3125 int androidToolType0, int androidToolType1, | 3128 int androidToolType0, int androidToolType1, |
3126 int androidButtonState, int androidMetaState, | 3129 int androidButtonState, int androidMetaState, |
3127 boolean isTouchHandleEvent); | 3130 boolean isTouchHandleEvent); |
3128 | 3131 |
3129 private native int nativeSendMouseMoveEvent( | 3132 private native int nativeSendMouseMoveEvent( |
3130 long nativeContentViewCoreImpl, long timeMs, float x, float y); | 3133 long nativeContentViewCoreImpl, long timeMs, float x, float y); |
3131 | 3134 |
3132 private native int nativeSendMouseWheelEvent( | 3135 private native int nativeSendMouseWheelEvent( |
3133 long nativeContentViewCoreImpl, long timeMs, float x, float y, float
verticalAxis, | 3136 long nativeContentViewCoreImpl, long timeMs, float x, float y, float
verticalAxis, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3209 String textTrackFontVariant, String textTrackTextColor, String textT
rackTextShadow, | 3212 String textTrackFontVariant, String textTrackTextColor, String textT
rackTextShadow, |
3210 String textTrackTextSize); | 3213 String textTrackTextSize); |
3211 | 3214 |
3212 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, | 3215 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp
l, |
3213 int x, int y, int w, int h); | 3216 int x, int y, int w, int h); |
3214 | 3217 |
3215 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); | 3218 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl
, boolean opaque); |
3216 | 3219 |
3217 private native void nativeSetDrawsContent(long nativeContentViewCoreImpl, bo
olean draws); | 3220 private native void nativeSetDrawsContent(long nativeContentViewCoreImpl, bo
olean draws); |
3218 } | 3221 } |
OLD | NEW |