OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_NATIVE_WEB_TOUCH_EVENT_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_NATIVE_WEB_TOUCH_EVENT_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "build/build_config.h" |
| 11 #include "content/common/content_export.h" |
| 12 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 13 #include "ui/events/event_constants.h" |
| 14 |
| 15 #if defined(OS_ANDROID) |
| 16 #include "content/browser/renderer_host/input/motion_event_android.h" |
| 17 #endif |
| 18 |
| 19 namespace content { |
| 20 |
| 21 // Owns a platform specific event; used to pass own and pass event through |
| 22 // platform independent code. |
| 23 struct CONTENT_EXPORT NativeWebTouchEvent : |
| 24 NON_EXPORTED_BASE(public blink::WebTouchEvent) { |
| 25 |
| 26 #if defined(OS_ANDROID) |
| 27 NativeWebTouchEvent(jobject android_motion_event, |
| 28 bool should_recycle, |
| 29 float device_scale_factor); |
| 30 #else |
| 31 NativeWebTouchEvent(); |
| 32 explicit NativeWebTouchEvent(const blink::WebTouchEvent& web_event); |
| 33 #endif |
| 34 |
| 35 NativeWebTouchEvent(const NativeWebTouchEvent& other); |
| 36 ~NativeWebTouchEvent(); |
| 37 |
| 38 NativeWebTouchEvent& operator=(const NativeWebTouchEvent& other); |
| 39 |
| 40 #if defined(OS_ANDROID) |
| 41 MotionEventAndroid android_event; |
| 42 float device_scale_factor; |
| 43 #endif |
| 44 |
| 45 private: |
| 46 NativeWebTouchEvent(); |
| 47 }; |
| 48 |
| 49 } // namespace content |
| 50 |
| 51 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_NATIVE_WEB_TOUCH_EVENT_H_ |
OLD | NEW |