OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 jfloat orientation_1_rad, | 45 jfloat orientation_1_rad, |
46 jfloat raw_pos_x_pixels, | 46 jfloat raw_pos_x_pixels, |
47 jfloat raw_pos_y_pixels, | 47 jfloat raw_pos_y_pixels, |
48 jint android_tool_type_0, | 48 jint android_tool_type_0, |
49 jint android_tool_type_1, | 49 jint android_tool_type_1, |
50 jint android_button_state, | 50 jint android_button_state, |
51 jint meta_state); | 51 jint meta_state); |
52 virtual ~MotionEventAndroid(); | 52 virtual ~MotionEventAndroid(); |
53 | 53 |
54 // ui::MotionEvent methods. | 54 // ui::MotionEvent methods. |
55 virtual int GetId() const OVERRIDE; | 55 virtual int GetId() const override; |
56 virtual Action GetAction() const OVERRIDE; | 56 virtual Action GetAction() const override; |
57 virtual int GetActionIndex() const OVERRIDE; | 57 virtual int GetActionIndex() const override; |
58 virtual size_t GetPointerCount() const OVERRIDE; | 58 virtual size_t GetPointerCount() const override; |
59 virtual int GetPointerId(size_t pointer_index) const OVERRIDE; | 59 virtual int GetPointerId(size_t pointer_index) const override; |
60 virtual float GetX(size_t pointer_index) const OVERRIDE; | 60 virtual float GetX(size_t pointer_index) const override; |
61 virtual float GetY(size_t pointer_index) const OVERRIDE; | 61 virtual float GetY(size_t pointer_index) const override; |
62 virtual float GetRawX(size_t pointer_index) const OVERRIDE; | 62 virtual float GetRawX(size_t pointer_index) const override; |
63 virtual float GetRawY(size_t pointer_index) const OVERRIDE; | 63 virtual float GetRawY(size_t pointer_index) const override; |
64 virtual float GetTouchMajor(size_t pointer_index) const OVERRIDE; | 64 virtual float GetTouchMajor(size_t pointer_index) const override; |
65 virtual float GetTouchMinor(size_t pointer_index) const OVERRIDE; | 65 virtual float GetTouchMinor(size_t pointer_index) const override; |
66 virtual float GetOrientation(size_t pointer_index) const OVERRIDE; | 66 virtual float GetOrientation(size_t pointer_index) const override; |
67 virtual float GetPressure(size_t pointer_index) const OVERRIDE; | 67 virtual float GetPressure(size_t pointer_index) const override; |
68 virtual base::TimeTicks GetEventTime() const OVERRIDE; | 68 virtual base::TimeTicks GetEventTime() const override; |
69 virtual size_t GetHistorySize() const OVERRIDE; | 69 virtual size_t GetHistorySize() const override; |
70 virtual base::TimeTicks GetHistoricalEventTime( | 70 virtual base::TimeTicks GetHistoricalEventTime( |
71 size_t historical_index) const OVERRIDE; | 71 size_t historical_index) const override; |
72 virtual float GetHistoricalTouchMajor(size_t pointer_index, | 72 virtual float GetHistoricalTouchMajor(size_t pointer_index, |
73 size_t historical_index) const OVERRIDE; | 73 size_t historical_index) const override; |
74 virtual float GetHistoricalX(size_t pointer_index, | 74 virtual float GetHistoricalX(size_t pointer_index, |
75 size_t historical_index) const OVERRIDE; | 75 size_t historical_index) const override; |
76 virtual float GetHistoricalY(size_t pointer_index, | 76 virtual float GetHistoricalY(size_t pointer_index, |
77 size_t historical_index) const OVERRIDE; | 77 size_t historical_index) const override; |
78 virtual ToolType GetToolType(size_t pointer_index) const OVERRIDE; | 78 virtual ToolType GetToolType(size_t pointer_index) const override; |
79 virtual int GetButtonState() const OVERRIDE; | 79 virtual int GetButtonState() const override; |
80 virtual int GetFlags() const OVERRIDE; | 80 virtual int GetFlags() const override; |
81 virtual scoped_ptr<MotionEvent> Clone() const OVERRIDE; | 81 virtual scoped_ptr<MotionEvent> Clone() const override; |
82 virtual scoped_ptr<MotionEvent> Cancel() const OVERRIDE; | 82 virtual scoped_ptr<MotionEvent> Cancel() const override; |
83 | 83 |
84 // Additional Android MotionEvent methods. | 84 // Additional Android MotionEvent methods. |
85 base::TimeTicks GetDownTime() const; | 85 base::TimeTicks GetDownTime() const; |
86 | 86 |
87 static bool RegisterMotionEventAndroid(JNIEnv* env); | 87 static bool RegisterMotionEventAndroid(JNIEnv* env); |
88 | 88 |
89 static base::android::ScopedJavaLocalRef<jobject> Obtain( | 89 static base::android::ScopedJavaLocalRef<jobject> Obtain( |
90 const MotionEventAndroid& event); | 90 const MotionEventAndroid& event); |
91 static base::android::ScopedJavaLocalRef<jobject> Obtain( | 91 static base::android::ScopedJavaLocalRef<jobject> Obtain( |
92 base::TimeTicks down_time, | 92 base::TimeTicks down_time, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 const float pix_to_dip_; | 132 const float pix_to_dip_; |
133 | 133 |
134 // Whether |event_| should be recycled on destruction. This will only be true | 134 // Whether |event_| should be recycled on destruction. This will only be true |
135 // for those events generated via |Obtain(...)|. | 135 // for those events generated via |Obtain(...)|. |
136 bool should_recycle_; | 136 bool should_recycle_; |
137 }; | 137 }; |
138 | 138 |
139 } // namespace content | 139 } // namespace content |
140 | 140 |
141 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ | 141 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOTION_EVENT_ANDROID_H_ |
OLD | NEW |