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 #ifndef REMOTING_CLIENT_JNI_JNI_TOUCH_EVENT_DATA_H_ | 5 #ifndef REMOTING_CLIENT_JNI_JNI_TOUCH_EVENT_DATA_H_ |
6 #define REMOTING_CLIENT_JNI_JNI_TOUCH_EVENT_DATA_H_ | 6 #define REMOTING_CLIENT_JNI_JNI_TOUCH_EVENT_DATA_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" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 | 12 |
13 namespace remoting { | 13 namespace remoting { |
14 | 14 |
15 namespace protocol { | 15 namespace protocol { |
16 class TouchEventPoint; | 16 class TouchEventPoint; |
17 } | 17 } |
18 | 18 |
19 class JniTouchEventData { | 19 class JniTouchEventData { |
20 public: | 20 public: |
21 JniTouchEventData(); | 21 JniTouchEventData(); |
22 ~JniTouchEventData(); | 22 ~JniTouchEventData(); |
23 | 23 |
24 // Register C++ methods exposed to Java using JNI. | |
25 static bool RegisterJni(JNIEnv* env); | |
26 | |
27 // Copies touch point data from a Java object to a C++ object. | 24 // Copies touch point data from a Java object to a C++ object. |
28 static void CopyTouchPointData( | 25 static void CopyTouchPointData( |
29 JNIEnv* env, | 26 JNIEnv* env, |
30 const base::android::ScopedJavaLocalRef<jobject>& java_object, | 27 const base::android::ScopedJavaLocalRef<jobject>& java_object, |
31 protocol::TouchEventPoint* touch_event_point); | 28 protocol::TouchEventPoint* touch_event_point); |
32 | 29 |
33 private: | 30 private: |
34 DISALLOW_COPY_AND_ASSIGN(JniTouchEventData); | 31 DISALLOW_COPY_AND_ASSIGN(JniTouchEventData); |
35 }; | 32 }; |
36 | 33 |
37 } // namespace remoting | 34 } // namespace remoting |
38 | 35 |
39 #endif // REMOTING_CLIENT_JNI_JNI_TOUCH_EVENT_DATA_H_ | 36 #endif // REMOTING_CLIENT_JNI_JNI_TOUCH_EVENT_DATA_H_ |
OLD | NEW |