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

Unified Diff: content/browser/renderer_host/input/native_web_touch_event_android.cc

Issue 128613003: [Tracking Patch] Unified gesture detection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/native_web_touch_event_android.cc
diff --git a/content/browser/renderer_host/input/native_web_touch_event_android.cc b/content/browser/renderer_host/input/native_web_touch_event_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b25af617be3fa59ce8799068d530c48d1fb878df
--- /dev/null
+++ b/content/browser/renderer_host/input/native_web_touch_event_android.cc
@@ -0,0 +1,38 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/renderer_host/input/native_web_touch_event.h"
+
+#include "base/android/jni_android.h"
+#include "content/browser/renderer_host/input/web_input_event_builders_android.h"
+
+namespace content {
+
+NativeWebTouchEvent::NativeWebTouchEvent(jobject android_motion_event,
+ bool should_recycle,
+ float device_scale_factor)
+ : android_event(base::android::AttachCurrentThread(),
+ android_motion_event,
+ should_recycle),
+ device_scale_factor(device_scale_factor) {
+ WebTouchEvent::operator=(
+ WebTouchEventBuilder::Build(android_event, device_scale_factor));
+}
+
+NativeWebTouchEvent::NativeWebTouchEvent(const NativeWebTouchEvent& other)
+ : WebTouchEvent(other),
+ android_event(other.android_event),
+ device_scale_factor(other.device_scale_factor) {}
+
+NativeWebTouchEvent::~NativeWebTouchEvent() {}
+
+NativeWebTouchEvent& NativeWebTouchEvent::operator=(
+ const NativeWebTouchEvent& other) {
+ WebTouchEvent::operator=(other);
+ android_event = other.android_event;
+ device_scale_factor = other.device_scale_factor;
+ return *this;
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698