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 namespace content { | 10 namespace content { |
(...skipping 20 matching lines...) Expand all Loading... |
31 // |event_type| is a value of WebInputEvent::Type. | 31 // |event_type| is a value of WebInputEvent::Type. |
32 bool SendSyntheticKeyEvent(JNIEnv*, | 32 bool SendSyntheticKeyEvent(JNIEnv*, |
33 jobject, | 33 jobject, |
34 int event_type, | 34 int event_type, |
35 long timestamp_ms, | 35 long timestamp_ms, |
36 int native_key_code, | 36 int native_key_code, |
37 int unicode_char); | 37 int unicode_char); |
38 void SetComposingText(JNIEnv*, jobject, jstring text, int new_cursor_pos); | 38 void SetComposingText(JNIEnv*, jobject, jstring text, int new_cursor_pos); |
39 void CommitText(JNIEnv*, jobject, jstring text); | 39 void CommitText(JNIEnv*, jobject, jstring text); |
40 void AttachImeAdapter(JNIEnv*, jobject java_object); | 40 void AttachImeAdapter(JNIEnv*, jobject java_object); |
41 void ReplaceText(JNIEnv*, jobject, jstring text); | |
42 void ClearFocus(JNIEnv*, jobject); | |
43 void SetEditableSelectionOffsets(JNIEnv*, jobject, int start, int end); | 41 void SetEditableSelectionOffsets(JNIEnv*, jobject, int start, int end); |
44 void SetComposingRegion(JNIEnv*, jobject, int start, int end); | 42 void SetComposingRegion(JNIEnv*, jobject, int start, int end); |
45 void DeleteSurroundingText(JNIEnv*, jobject, int before, int after); | 43 void DeleteSurroundingText(JNIEnv*, jobject, int before, int after); |
46 void Unselect(JNIEnv*, jobject); | 44 void Unselect(JNIEnv*, jobject); |
47 void SelectAll(JNIEnv*, jobject); | 45 void SelectAll(JNIEnv*, jobject); |
48 void Cut(JNIEnv*, jobject); | 46 void Cut(JNIEnv*, jobject); |
49 void Copy(JNIEnv*, jobject); | 47 void Copy(JNIEnv*, jobject); |
50 void Paste(JNIEnv*, jobject); | 48 void Paste(JNIEnv*, jobject); |
51 | 49 |
52 // Called from native -> java | 50 // Called from native -> java |
53 void CancelComposition(); | 51 void CancelComposition(); |
54 | 52 |
| 53 // Native methods related to dialog like types |
| 54 void CancelDialog(JNIEnv*, jobject); |
| 55 void ReplaceDateTime(JNIEnv*, jobject, jstring text); |
| 56 |
55 private: | 57 private: |
56 RenderWidgetHostViewAndroid* rwhva_; | 58 RenderWidgetHostViewAndroid* rwhva_; |
57 jobject java_ime_adapter_; | 59 jobject java_ime_adapter_; |
58 }; | 60 }; |
59 | 61 |
60 bool RegisterImeAdapter(JNIEnv* env); | 62 bool RegisterImeAdapter(JNIEnv* env); |
61 | 63 |
62 } // namespace content | 64 } // namespace content |
63 | 65 |
64 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | 66 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |
OLD | NEW |