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

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

Issue 1417803002: Pass MotionEvent tilt angles to Blink on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Flattened nested ifs, fixed a special case Created 5 years, 1 month 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
« no previous file with comments | « content/content_tests.gypi ('k') | ui/events/blink/blink_event_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 final boolean consumed = nativeOnTouchEvent(mNativeContentViewCore, event, 1216 final boolean consumed = nativeOnTouchEvent(mNativeContentViewCore, event,
1217 event.getEventTime(), eventAction, 1217 event.getEventTime(), eventAction,
1218 pointerCount, event.getHistorySize(), event.getActionIndex() , 1218 pointerCount, event.getHistorySize(), event.getActionIndex() ,
1219 event.getX(), event.getY(), 1219 event.getX(), event.getY(),
1220 pointerCount > 1 ? event.getX(1) : 0, 1220 pointerCount > 1 ? event.getX(1) : 0,
1221 pointerCount > 1 ? event.getY(1) : 0, 1221 pointerCount > 1 ? event.getY(1) : 0,
1222 event.getPointerId(0), pointerCount > 1 ? event.getPointerId (1) : -1, 1222 event.getPointerId(0), pointerCount > 1 ? event.getPointerId (1) : -1,
1223 event.getTouchMajor(), pointerCount > 1 ? event.getTouchMajo r(1) : 0, 1223 event.getTouchMajor(), pointerCount > 1 ? event.getTouchMajo r(1) : 0,
1224 event.getTouchMinor(), pointerCount > 1 ? event.getTouchMino r(1) : 0, 1224 event.getTouchMinor(), pointerCount > 1 ? event.getTouchMino r(1) : 0,
1225 event.getOrientation(), pointerCount > 1 ? event.getOrientat ion(1) : 0, 1225 event.getOrientation(), pointerCount > 1 ? event.getOrientat ion(1) : 0,
1226 event.getAxisValue(MotionEvent.AXIS_TILT),
1227 pointerCount > 1 ? event.getAxisValue(MotionEvent.AXIS_TILT, 1) : 0,
1226 event.getRawX(), event.getRawY(), 1228 event.getRawX(), event.getRawY(),
1227 event.getToolType(0), 1229 event.getToolType(0),
1228 pointerCount > 1 ? event.getToolType(1) : MotionEvent.TOOL_T YPE_UNKNOWN, 1230 pointerCount > 1 ? event.getToolType(1) : MotionEvent.TOOL_T YPE_UNKNOWN,
1229 event.getButtonState(), 1231 event.getButtonState(),
1230 event.getMetaState(), 1232 event.getMetaState(),
1231 isTouchHandleEvent); 1233 isTouchHandleEvent);
1232 1234
1233 if (offset != null) offset.recycle(); 1235 if (offset != null) offset.recycle();
1234 return consumed; 1236 return consumed;
1235 } finally { 1237 } finally {
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
3261 3263
3262 // All touch events (including flings, scrolls etc) accept coordinates in ph ysical pixels. 3264 // All touch events (including flings, scrolls etc) accept coordinates in ph ysical pixels.
3263 private native boolean nativeOnTouchEvent( 3265 private native boolean nativeOnTouchEvent(
3264 long nativeContentViewCoreImpl, MotionEvent event, 3266 long nativeContentViewCoreImpl, MotionEvent event,
3265 long timeMs, int action, int pointerCount, int historySize, int acti onIndex, 3267 long timeMs, int action, int pointerCount, int historySize, int acti onIndex,
3266 float x0, float y0, float x1, float y1, 3268 float x0, float y0, float x1, float y1,
3267 int pointerId0, int pointerId1, 3269 int pointerId0, int pointerId1,
3268 float touchMajor0, float touchMajor1, 3270 float touchMajor0, float touchMajor1,
3269 float touchMinor0, float touchMinor1, 3271 float touchMinor0, float touchMinor1,
3270 float orientation0, float orientation1, 3272 float orientation0, float orientation1,
3273 float tilt0, float tilt1,
3271 float rawX, float rawY, 3274 float rawX, float rawY,
3272 int androidToolType0, int androidToolType1, 3275 int androidToolType0, int androidToolType1,
3273 int androidButtonState, int androidMetaState, 3276 int androidButtonState, int androidMetaState,
3274 boolean isTouchHandleEvent); 3277 boolean isTouchHandleEvent);
3275 3278
3276 private native int nativeSendMouseMoveEvent( 3279 private native int nativeSendMouseMoveEvent(
3277 long nativeContentViewCoreImpl, long timeMs, float x, float y); 3280 long nativeContentViewCoreImpl, long timeMs, float x, float y);
3278 3281
3279 private native int nativeSendMouseWheelEvent(long nativeContentViewCoreImpl, long timeMs, 3282 private native int nativeSendMouseWheelEvent(long nativeContentViewCoreImpl, long timeMs,
3280 float x, float y, float ticksX, float ticksY, float pixelsPerTick); 3283 float x, float y, float ticksX, float ticksY, float pixelsPerTick);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
3352 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l, 3355 private native void nativeSetTextTrackSettings(long nativeContentViewCoreImp l,
3353 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily, 3356 boolean textTracksEnabled, String textTrackBackgroundColor, String t extTrackFontFamily,
3354 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor, 3357 String textTrackFontStyle, String textTrackFontVariant, String textT rackTextColor,
3355 String textTrackTextShadow, String textTrackTextSize); 3358 String textTrackTextShadow, String textTrackTextSize);
3356 3359
3357 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l, 3360 private native void nativeExtractSmartClipData(long nativeContentViewCoreImp l,
3358 int x, int y, int w, int h); 3361 int x, int y, int w, int h);
3359 3362
3360 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque); 3363 private native void nativeSetBackgroundOpaque(long nativeContentViewCoreImpl , boolean opaque);
3361 } 3364 }
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | ui/events/blink/blink_event_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698