Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Side by Side Diff: remoting/client/jni/jni_touch_event_data.cc

Issue 2146753002: Android: Remove unneeded RegisterNatives() calls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android: Don't require RegisterNatives if there are none Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 bool JniTouchEventData::RegisterJni(JNIEnv* env) {
18 return RegisterNativesImpl(env);
19 }
20
21 // static
22 void JniTouchEventData::CopyTouchPointData( 17 void JniTouchEventData::CopyTouchPointData(
23 JNIEnv* env, 18 JNIEnv* env,
24 const base::android::ScopedJavaLocalRef<jobject>& java_object, 19 const base::android::ScopedJavaLocalRef<jobject>& java_object,
25 protocol::TouchEventPoint* touch_event_point) { 20 protocol::TouchEventPoint* touch_event_point) {
26 touch_event_point->set_id( 21 touch_event_point->set_id(
27 Java_TouchEventData_getTouchPointId(env, java_object.obj())); 22 Java_TouchEventData_getTouchPointId(env, java_object.obj()));
28 23
29 touch_event_point->set_x( 24 touch_event_point->set_x(
30 Java_TouchEventData_getTouchPointX(env, java_object.obj())); 25 Java_TouchEventData_getTouchPointX(env, java_object.obj()));
31 26
32 touch_event_point->set_y( 27 touch_event_point->set_y(
33 Java_TouchEventData_getTouchPointY(env, java_object.obj())); 28 Java_TouchEventData_getTouchPointY(env, java_object.obj()));
34 29
35 touch_event_point->set_radius_x( 30 touch_event_point->set_radius_x(
36 Java_TouchEventData_getTouchPointRadiusX(env, java_object.obj())); 31 Java_TouchEventData_getTouchPointRadiusX(env, java_object.obj()));
37 32
38 touch_event_point->set_radius_y( 33 touch_event_point->set_radius_y(
39 Java_TouchEventData_getTouchPointRadiusY(env, java_object.obj())); 34 Java_TouchEventData_getTouchPointRadiusY(env, java_object.obj()));
40 35
41 touch_event_point->set_angle( 36 touch_event_point->set_angle(
42 Java_TouchEventData_getTouchPointAngle(env, java_object.obj())); 37 Java_TouchEventData_getTouchPointAngle(env, java_object.obj()));
43 38
44 touch_event_point->set_pressure( 39 touch_event_point->set_pressure(
45 Java_TouchEventData_getTouchPointPressure(env, java_object.obj())); 40 Java_TouchEventData_getTouchPointPressure(env, java_object.obj()));
46 } 41 }
47 42
48 } // namespace remoting 43 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698