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

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

Issue 1187273004: Pass MotionEvent tilt angles to Blink on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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.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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 final boolean consumed = nativeOnTouchEvent(mNativeContentViewCore, event, 1211 final boolean consumed = nativeOnTouchEvent(mNativeContentViewCore, event,
1212 event.getEventTime(), eventAction, 1212 event.getEventTime(), eventAction,
1213 pointerCount, event.getHistorySize(), event.getActionIndex() , 1213 pointerCount, event.getHistorySize(), event.getActionIndex() ,
1214 event.getX(), event.getY(), 1214 event.getX(), event.getY(),
1215 pointerCount > 1 ? event.getX(1) : 0, 1215 pointerCount > 1 ? event.getX(1) : 0,
1216 pointerCount > 1 ? event.getY(1) : 0, 1216 pointerCount > 1 ? event.getY(1) : 0,
1217 event.getPointerId(0), pointerCount > 1 ? event.getPointerId (1) : -1, 1217 event.getPointerId(0), pointerCount > 1 ? event.getPointerId (1) : -1,
1218 event.getTouchMajor(), pointerCount > 1 ? event.getTouchMajo r(1) : 0, 1218 event.getTouchMajor(), pointerCount > 1 ? event.getTouchMajo r(1) : 0,
1219 event.getTouchMinor(), pointerCount > 1 ? event.getTouchMino r(1) : 0, 1219 event.getTouchMinor(), pointerCount > 1 ? event.getTouchMino r(1) : 0,
1220 event.getOrientation(), pointerCount > 1 ? event.getOrientat ion(1) : 0, 1220 event.getOrientation(), pointerCount > 1 ? event.getOrientat ion(1) : 0,
1221 event.getAxisValue(MotionEvent.AXIS_TILT),
1222 pointerCount > 1 ? event.getAxisValue(MotionEvent.AXIS_TILT, 1) : 0,
1221 event.getRawX(), event.getRawY(), 1223 event.getRawX(), event.getRawY(),
1222 event.getToolType(0), 1224 event.getToolType(0),
1223 pointerCount > 1 ? event.getToolType(1) : MotionEvent.TOOL_T YPE_UNKNOWN, 1225 pointerCount > 1 ? event.getToolType(1) : MotionEvent.TOOL_T YPE_UNKNOWN,
1224 event.getButtonState(), 1226 event.getButtonState(),
1225 event.getMetaState(), 1227 event.getMetaState(),
1226 isTouchHandleEvent); 1228 isTouchHandleEvent);
1227 1229
1228 if (offset != null) offset.recycle(); 1230 if (offset != null) offset.recycle();
1229 return consumed; 1231 return consumed;
1230 } finally { 1232 } finally {
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after
3228 3230
3229 // All touch events (including flings, scrolls etc) accept coordinates in ph ysical pixels. 3231 // All touch events (including flings, scrolls etc) accept coordinates in ph ysical pixels.
3230 private native boolean nativeOnTouchEvent( 3232 private native boolean nativeOnTouchEvent(
3231 long nativeContentViewCoreImpl, MotionEvent event, 3233 long nativeContentViewCoreImpl, MotionEvent event,
3232 long timeMs, int action, int pointerCount, int historySize, int acti onIndex, 3234 long timeMs, int action, int pointerCount, int historySize, int acti onIndex,
3233 float x0, float y0, float x1, float y1, 3235 float x0, float y0, float x1, float y1,
3234 int pointerId0, int pointerId1, 3236 int pointerId0, int pointerId1,
3235 float touchMajor0, float touchMajor1, 3237 float touchMajor0, float touchMajor1,
3236 float touchMinor0, float touchMinor1, 3238 float touchMinor0, float touchMinor1,
3237 float orientation0, float orientation1, 3239 float orientation0, float orientation1,
3240 float tilt0, float tilt1,
3238 float rawX, float rawY, 3241 float rawX, float rawY,
3239 int androidToolType0, int androidToolType1, 3242 int androidToolType0, int androidToolType1,
3240 int androidButtonState, int androidMetaState, 3243 int androidButtonState, int androidMetaState,
3241 boolean isTouchHandleEvent); 3244 boolean isTouchHandleEvent);
3242 3245
3243 private native int nativeSendMouseMoveEvent( 3246 private native int nativeSendMouseMoveEvent(
3244 long nativeContentViewCoreImpl, long timeMs, float x, float y); 3247 long nativeContentViewCoreImpl, long timeMs, float x, float y);
3245 3248
3246 private native int nativeSendMouseWheelEvent(long nativeContentViewCoreImpl, long timeMs, 3249 private native int nativeSendMouseWheelEvent(long nativeContentViewCoreImpl, long timeMs,
3247 float x, float y, float ticksX, float ticksY, float pixelsPerTick); 3250 float x, float y, float ticksX, float ticksY, float pixelsPerTick);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
3319 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l, 3322 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l,
3320 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily, 3323 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily,
3321 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor, 3324 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor,
3322 String textTrackTextShadow, String textTrackTextSize); 3325 String textTrackTextShadow, String textTrackTextSize);
3323 3326
3324 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, 3327 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l,
3325 int x, int y, int w, int h); 3328 int x, int y, int w, int h);
3326 3329
3327 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); 3330 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque);
3328 } 3331 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698