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

Unified Diff: content/browser/renderer_host/input/native_web_touch_event.h

Issue 128613003: [Tracking Patch] Unified gesture detection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address tdresser@ comments and run clang-format on everything 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.h
diff --git a/content/browser/renderer_host/input/native_web_touch_event.h b/content/browser/renderer_host/input/native_web_touch_event.h
new file mode 100644
index 0000000000000000000000000000000000000000..70e29118be10b70f2f168da88265b979e561be70
--- /dev/null
+++ b/content/browser/renderer_host/input/native_web_touch_event.h
@@ -0,0 +1,51 @@
+// 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.
+
+#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_NATIVE_WEB_TOUCH_EVENT_H_
+#define CONTENT_BROWSER_RENDERER_HOST_INPUT_NATIVE_WEB_TOUCH_EVENT_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "build/build_config.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/web/WebInputEvent.h"
+#include "ui/events/event_constants.h"
+
+#if defined(OS_ANDROID)
+#include "content/browser/renderer_host/input/motion_event_android.h"
+#endif
+
+namespace content {
+
+// Owns a platform specific event; used to pass own and pass event through
+// platform independent code.
+struct CONTENT_EXPORT NativeWebTouchEvent :
+ NON_EXPORTED_BASE(public blink::WebTouchEvent) {
+
+#if defined(OS_ANDROID)
+ NativeWebTouchEvent(jobject android_motion_event,
+ bool should_recycle,
+ float device_scale_factor);
+#else
+ NativeWebTouchEvent();
+ explicit NativeWebTouchEvent(const blink::WebTouchEvent& web_event);
+#endif
+
+ NativeWebTouchEvent(const NativeWebTouchEvent& other);
+ ~NativeWebTouchEvent();
+
+ NativeWebTouchEvent& operator=(const NativeWebTouchEvent& other);
+
+#if defined(OS_ANDROID)
+ MotionEventAndroid android_event;
+ float device_scale_factor;
+#endif
+
+ private:
+ NativeWebTouchEvent();
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_NATIVE_WEB_TOUCH_EVENT_H_

Powered by Google App Engine
This is Rietveld 408576698