diff options
author | mohsen@chromium.org <mohsen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-21 23:00:28 +0000 |
---|---|---|
committer | mohsen@chromium.org <mohsen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-21 23:00:28 +0000 |
commit | ea6c4239e295ebf0c8e36199d425a482c7f5b3ac (patch) | |
tree | fd23053b47c9cc7f6e4bc967147077b1d0894fac /content/browser/android | |
parent | f42cac91cbfcfe6c3e84261e0e95d84a55881651 (diff) | |
download | chromium_src-ea6c4239e295ebf0c8e36199d425a482c7f5b3ac.zip chromium_src-ea6c4239e295ebf0c8e36199d425a482c7f5b3ac.tar.gz chromium_src-ea6c4239e295ebf0c8e36199d425a482c7f5b3ac.tar.bz2 |
As part of refactoring GestureEventFilter and separating
TapSuppressionController for touchpad and touchscreen, we need to know if a
WebGestureEvent is coming from touchscreen or touchpad.
Now, whenever a WebGestureEvent is created, its sourceDevice is set to the
appropriate value.
BUG=164389
Review URL: https://chromiumcodereview.appspot.com/11308334
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/android')
-rw-r--r-- | content/browser/android/content_view_core_impl.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc index ab764f2..50e9720 100644 --- a/content/browser/android/content_view_core_impl.cc +++ b/content/browser/android/content_view_core_impl.cc @@ -847,6 +847,7 @@ WebGestureEvent ContentViewCoreImpl::MakeGestureEvent(WebInputEvent::Type type, event.x = x / DpiScale(); event.y = y / DpiScale(); event.timeStampSeconds = time_ms / 1000.0; + event.sourceDevice = WebGestureEvent::Touchscreen; UpdateVSyncFlagOnInputEvent(&event); return event; } @@ -894,6 +895,8 @@ void ContentViewCoreImpl::FlingStart(JNIEnv* env, jobject obj, jlong time_ms, WebInputEvent::GestureFlingStart, time_ms, x, y); event.data.flingStart.velocityX = vx / DpiScale(); event.data.flingStart.velocityY = vy / DpiScale(); + // FIXME(mohsen || rjkroege): Remove following line after removing uses of + // flingStart.sourceDevice in WebKit, but before removing the field itself. event.data.flingStart.sourceDevice = WebGestureEvent::Touchscreen; if (GetRenderWidgetHostViewAndroid()) |