| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "remoting/client/jni/jni_touch_event_data.h" | 5 #include "remoting/client/jni/jni_touch_event_data.h" |
| 6 | 6 |
| 7 #include "jni/TouchEventData_jni.h" | 7 #include "jni/TouchEventData_jni.h" |
| 8 #include "remoting/proto/event.pb.h" | 8 #include "remoting/proto/event.pb.h" |
| 9 | 9 |
| 10 namespace remoting { | 10 namespace remoting { |
| 11 | 11 |
| 12 JniTouchEventData::JniTouchEventData() {} | 12 JniTouchEventData::JniTouchEventData() {} |
| 13 | 13 |
| 14 JniTouchEventData::~JniTouchEventData() {} | 14 JniTouchEventData::~JniTouchEventData() {} |
| 15 | 15 |
| 16 // static | 16 // static |
| 17 void JniTouchEventData::CopyTouchPointData( | 17 void JniTouchEventData::CopyTouchPointData( |
| 18 JNIEnv* env, | 18 JNIEnv* env, |
| 19 const base::android::ScopedJavaLocalRef<jobject>& java_object, | 19 const base::android::ScopedJavaLocalRef<jobject>& java_object, |
| 20 protocol::TouchEventPoint* touch_event_point) { | 20 protocol::TouchEventPoint* touch_event_point) { |
| 21 touch_event_point->set_id( | 21 touch_event_point->set_id( |
| 22 Java_TouchEventData_getTouchPointId(env, java_object.obj())); | 22 Java_TouchEventData_getTouchPointId(env, java_object)); |
| 23 | 23 |
| 24 touch_event_point->set_x( | 24 touch_event_point->set_x( |
| 25 Java_TouchEventData_getTouchPointX(env, java_object.obj())); | 25 Java_TouchEventData_getTouchPointX(env, java_object)); |
| 26 | 26 |
| 27 touch_event_point->set_y( | 27 touch_event_point->set_y( |
| 28 Java_TouchEventData_getTouchPointY(env, java_object.obj())); | 28 Java_TouchEventData_getTouchPointY(env, java_object)); |
| 29 | 29 |
| 30 touch_event_point->set_radius_x( | 30 touch_event_point->set_radius_x( |
| 31 Java_TouchEventData_getTouchPointRadiusX(env, java_object.obj())); | 31 Java_TouchEventData_getTouchPointRadiusX(env, java_object)); |
| 32 | 32 |
| 33 touch_event_point->set_radius_y( | 33 touch_event_point->set_radius_y( |
| 34 Java_TouchEventData_getTouchPointRadiusY(env, java_object.obj())); | 34 Java_TouchEventData_getTouchPointRadiusY(env, java_object)); |
| 35 | 35 |
| 36 touch_event_point->set_angle( | 36 touch_event_point->set_angle( |
| 37 Java_TouchEventData_getTouchPointAngle(env, java_object.obj())); | 37 Java_TouchEventData_getTouchPointAngle(env, java_object)); |
| 38 | 38 |
| 39 touch_event_point->set_pressure( | 39 touch_event_point->set_pressure( |
| 40 Java_TouchEventData_getTouchPointPressure(env, java_object.obj())); | 40 Java_TouchEventData_getTouchPointPressure(env, java_object)); |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace remoting | 43 } // namespace remoting |
| OLD | NEW |