| OLD | NEW |
| 1 | 1 |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ | 6 #ifndef UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_ |
| 7 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ | 7 #define UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_ |
| 8 | 8 |
| 9 #include <jni.h> | 9 #include <jni.h> |
| 10 | 10 |
| 11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 12 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 14 #include "content/common/content_export.h" | 15 #include "ui/gfx/geometry/point_f.h" |
| 16 #include "ui/events/events_export.h" |
| 15 #include "ui/events/gesture_detection/motion_event.h" | 17 #include "ui/events/gesture_detection/motion_event.h" |
| 16 #include "ui/gfx/geometry/point_f.h" | |
| 17 | 18 |
| 18 namespace content { | 19 namespace ui { |
| 19 | 20 |
| 20 // Implementation of ui::MotionEvent wrapping a native Android MotionEvent. | 21 // Implementation of ui::MotionEvent wrapping a native Android MotionEvent. |
| 21 // All *input* coordinates are in device pixels (as with Android MotionEvent), | 22 // All *input* coordinates are in device pixels (as with Android MotionEvent), |
| 22 // while all *output* coordinates are in DIPs (as with WebTouchEvent). | 23 // while all *output* coordinates are in DIPs (as with WebTouchEvent). |
| 23 class CONTENT_EXPORT MotionEventAndroid : public ui::MotionEvent { | 24 class EVENTS_EXPORT MotionEventAndroid : public MotionEvent { |
| 24 public: | 25 public: |
| 25 struct Pointer { | 26 struct Pointer { |
| 26 Pointer(jint id, | 27 Pointer(jint id, |
| 27 jfloat pos_x_pixels, | 28 jfloat pos_x_pixels, |
| 28 jfloat pos_y_pixels, | 29 jfloat pos_y_pixels, |
| 29 jfloat touch_major_pixels, | 30 jfloat touch_major_pixels, |
| 30 jfloat touch_minor_pixels, | 31 jfloat touch_minor_pixels, |
| 31 jfloat orientation_rad, | 32 jfloat orientation_rad, |
| 32 jint tool_type); | 33 jint tool_type); |
| 33 jint id; | 34 jint id; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } cached_pointers_[MAX_POINTERS_TO_CACHE]; | 125 } cached_pointers_[MAX_POINTERS_TO_CACHE]; |
| 125 | 126 |
| 126 // A unique identifier for the Android motion event. | 127 // A unique identifier for the Android motion event. |
| 127 const uint32 unique_event_id_; | 128 const uint32 unique_event_id_; |
| 128 | 129 |
| 129 DISALLOW_COPY_AND_ASSIGN(MotionEventAndroid); | 130 DISALLOW_COPY_AND_ASSIGN(MotionEventAndroid); |
| 130 }; | 131 }; |
| 131 | 132 |
| 132 } // namespace content | 133 } // namespace content |
| 133 | 134 |
| 134 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ | 135 #endif // UI_EVENTS_ANDROID_MOTION_EVENT_ANDROID_H_ |
| OLD | NEW |