OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/android/jni_weak_ref.h" | 10 #include "base/android/jni_weak_ref.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 explicit ImeAdapterAndroid(RenderWidgetHostViewAndroid* rwhva); | 27 explicit ImeAdapterAndroid(RenderWidgetHostViewAndroid* rwhva); |
28 ~ImeAdapterAndroid(); | 28 ~ImeAdapterAndroid(); |
29 | 29 |
30 // Called from java -> native | 30 // Called from java -> native |
31 // The java side is responsible to translate android KeyEvent various enums | 31 // The java side is responsible to translate android KeyEvent various enums |
32 // and values into the corresponding blink::WebInputEvent. | 32 // and values into the corresponding blink::WebInputEvent. |
33 bool SendKeyEvent(JNIEnv* env, jobject, | 33 bool SendKeyEvent(JNIEnv* env, jobject, |
34 jobject original_key_event, | 34 jobject original_key_event, |
35 int action, int meta_state, | 35 int action, int meta_state, |
36 long event_time, int key_code, | 36 long event_time, int key_code, |
37 bool is_system_key, int unicode_text); | 37 int scan_code, bool is_system_key, |
| 38 int unicode_text); |
38 // |event_type| is a value of WebInputEvent::Type. | 39 // |event_type| is a value of WebInputEvent::Type. |
39 bool SendSyntheticKeyEvent(JNIEnv*, | 40 bool SendSyntheticKeyEvent(JNIEnv*, |
40 jobject, | 41 jobject, |
41 int event_type, | 42 int event_type, |
42 long timestamp_ms, | 43 long timestamp_ms, |
43 int native_key_code, | 44 int native_key_code, |
44 int modifiers, | 45 int modifiers, |
45 int unicode_char); | 46 int unicode_char); |
46 void SetComposingText(JNIEnv*, | 47 void SetComposingText(JNIEnv*, |
47 jobject obj, | 48 jobject obj, |
(...skipping 19 matching lines...) Expand all Loading... |
67 | 68 |
68 RenderWidgetHostViewAndroid* rwhva_; | 69 RenderWidgetHostViewAndroid* rwhva_; |
69 JavaObjectWeakGlobalRef java_ime_adapter_; | 70 JavaObjectWeakGlobalRef java_ime_adapter_; |
70 }; | 71 }; |
71 | 72 |
72 bool RegisterImeAdapter(JNIEnv* env); | 73 bool RegisterImeAdapter(JNIEnv* env); |
73 | 74 |
74 } // namespace content | 75 } // namespace content |
75 | 76 |
76 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | 77 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |
OLD | NEW |