OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UI_EVENTS_ANDROID_KEY_EVENT_UTILS_H_ | 5 #ifndef UI_EVENTS_ANDROID_KEY_EVENT_UTILS_H_ |
6 #define UI_EVENTS_ANDROID_KEY_EVENT_UTILS_H_ | 6 #define UI_EVENTS_ANDROID_KEY_EVENT_UTILS_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 "ui/events/events_export.h" | 11 #include "ui/events/events_export.h" |
12 | 12 |
13 namespace ui { | 13 namespace ui { |
14 namespace events { | 14 namespace events { |
15 namespace android { | 15 namespace android { |
16 | 16 |
17 bool RegisterKeyEvent(JNIEnv* env); | |
18 | |
19 EVENTS_EXPORT base::android::ScopedJavaLocalRef<jobject> | 17 EVENTS_EXPORT base::android::ScopedJavaLocalRef<jobject> |
20 CreateKeyEvent(JNIEnv* env, int action, int key_code); | 18 CreateKeyEvent(JNIEnv* env, int action, int key_code); |
21 | 19 |
22 EVENTS_EXPORT int GetKeyEventUnicodeChar( | 20 EVENTS_EXPORT int GetKeyEventUnicodeChar( |
23 JNIEnv* env, | 21 JNIEnv* env, |
24 const base::android::JavaRef<jobject>& event, | 22 const base::android::JavaRef<jobject>& event, |
25 int meta_state); | 23 int meta_state); |
26 | 24 |
27 } // namespace android | 25 } // namespace android |
28 } // namespace events | 26 } // namespace events |
29 } // namespace ui | 27 } // namespace ui |
30 | 28 |
31 #endif // UI_EVENTS_ANDROID_KEY_EVENT_UTISL_H_ | 29 #endif // UI_EVENTS_ANDROID_KEY_EVENT_UTISL_H_ |
OLD | NEW |