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_ |