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 23 matching lines...) Expand all Loading... |
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 bool is_system_key, int unicode_text); |
38 // |event_type| is a value of WebInputEvent::Type. | 38 // |event_type| is a value of WebInputEvent::Type. |
39 bool SendSyntheticKeyEvent(JNIEnv*, | 39 bool SendSyntheticKeyEvent(JNIEnv*, |
40 jobject, | 40 jobject, |
41 int event_type, | 41 int event_type, |
42 long timestamp_ms, | 42 long timestamp_ms, |
43 int native_key_code, | 43 int native_key_code, |
| 44 int modifiers, |
44 int unicode_char); | 45 int unicode_char); |
45 void SetComposingText(JNIEnv*, | 46 void SetComposingText(JNIEnv*, |
46 jobject obj, | 47 jobject obj, |
47 jobject text, | 48 jobject text, |
48 jstring text_str, | 49 jstring text_str, |
49 int new_cursor_pos); | 50 int new_cursor_pos); |
50 void CommitText(JNIEnv*, jobject, jstring text_str); | 51 void CommitText(JNIEnv*, jobject, jstring text_str); |
51 void FinishComposingText(JNIEnv* env, jobject); | 52 void FinishComposingText(JNIEnv* env, jobject); |
52 void AttachImeAdapter(JNIEnv*, jobject java_object); | 53 void AttachImeAdapter(JNIEnv*, jobject java_object); |
53 void SetEditableSelectionOffsets(JNIEnv*, jobject, int start, int end); | 54 void SetEditableSelectionOffsets(JNIEnv*, jobject, int start, int end); |
(...skipping 17 matching lines...) Expand all Loading... |
71 | 72 |
72 RenderWidgetHostViewAndroid* rwhva_; | 73 RenderWidgetHostViewAndroid* rwhva_; |
73 JavaObjectWeakGlobalRef java_ime_adapter_; | 74 JavaObjectWeakGlobalRef java_ime_adapter_; |
74 }; | 75 }; |
75 | 76 |
76 bool RegisterImeAdapter(JNIEnv* env); | 77 bool RegisterImeAdapter(JNIEnv* env); |
77 | 78 |
78 } // namespace content | 79 } // namespace content |
79 | 80 |
80 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | 81 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |
OLD | NEW |