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 #include "content/browser/renderer_host/input/motion_event_android.h" | 5 #include "content/browser/renderer_host/input/motion_event_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "jni/MotionEvent_jni.h" | 8 #include "jni/MotionEvent_jni.h" |
9 | 9 |
10 using base::android::AttachCurrentThread; | 10 using base::android::AttachCurrentThread; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 cached_pointer_ids_[i] = other.cached_pointer_ids_[i]; | 138 cached_pointer_ids_[i] = other.cached_pointer_ids_[i]; |
139 cached_touch_majors_[i] = other.cached_touch_majors_[i]; | 139 cached_touch_majors_[i] = other.cached_touch_majors_[i]; |
140 } | 140 } |
141 } | 141 } |
142 | 142 |
143 MotionEventAndroid::~MotionEventAndroid() { | 143 MotionEventAndroid::~MotionEventAndroid() { |
144 if (should_recycle_) | 144 if (should_recycle_) |
145 Java_MotionEvent_recycle(AttachCurrentThread(), event_.obj()); | 145 Java_MotionEvent_recycle(AttachCurrentThread(), event_.obj()); |
146 } | 146 } |
147 | 147 |
| 148 int MotionEventAndroid::GetId() const { |
| 149 return 0; |
| 150 } |
| 151 |
148 MotionEventAndroid::Action MotionEventAndroid::GetAction() const { | 152 MotionEventAndroid::Action MotionEventAndroid::GetAction() const { |
149 return cached_action_; | 153 return cached_action_; |
150 } | 154 } |
151 | 155 |
152 int MotionEventAndroid::GetActionIndex() const { | 156 int MotionEventAndroid::GetActionIndex() const { |
153 return cached_action_index_; | 157 return cached_action_index_; |
154 } | 158 } |
155 | 159 |
156 size_t MotionEventAndroid::GetPointerCount() const { | 160 size_t MotionEventAndroid::GetPointerCount() const { |
157 return cached_pointer_count_; | 161 return cached_pointer_count_; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 return Java_MotionEvent_obtainAVME_J_J_I_F_F_I(AttachCurrentThread(), | 282 return Java_MotionEvent_obtainAVME_J_J_I_F_F_I(AttachCurrentThread(), |
279 ToAndroidTime(down_time), | 283 ToAndroidTime(down_time), |
280 ToAndroidTime(event_time), | 284 ToAndroidTime(event_time), |
281 ToAndroidAction(action), | 285 ToAndroidAction(action), |
282 x, | 286 x, |
283 y, | 287 y, |
284 0); | 288 0); |
285 } | 289 } |
286 | 290 |
287 } // namespace content | 291 } // namespace content |
OLD | NEW |