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 <vector> | 10 #include <vector> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 int end); | 65 int end); |
66 void DeleteSurroundingText(JNIEnv*, | 66 void DeleteSurroundingText(JNIEnv*, |
67 const base::android::JavaParamRef<jobject>&, | 67 const base::android::JavaParamRef<jobject>&, |
68 int before, | 68 int before, |
69 int after); | 69 int after); |
70 void ResetImeAdapter(JNIEnv*, const base::android::JavaParamRef<jobject>&); | 70 void ResetImeAdapter(JNIEnv*, const base::android::JavaParamRef<jobject>&); |
71 void RequestCursorUpdate(JNIEnv*, const base::android::JavaParamRef<jobject>&, | 71 void RequestCursorUpdate(JNIEnv*, const base::android::JavaParamRef<jobject>&, |
72 bool immediateRequest, bool monitorRequest); | 72 bool immediateRequest, bool monitorRequest); |
73 bool RequestTextInputStateUpdate(JNIEnv*, | 73 bool RequestTextInputStateUpdate(JNIEnv*, |
74 const base::android::JavaParamRef<jobject>&); | 74 const base::android::JavaParamRef<jobject>&); |
75 bool IsImeThreadEnabled(JNIEnv*, const base::android::JavaParamRef<jobject>&); | |
76 | 75 |
77 // Called from native -> java | 76 // Called from native -> java |
78 void CancelComposition(); | 77 void CancelComposition(); |
79 void FocusedNodeChanged(bool is_editable_node); | 78 void FocusedNodeChanged(bool is_editable_node); |
80 void SetCharacterBounds(const std::vector<gfx::RectF>& rects); | 79 void SetCharacterBounds(const std::vector<gfx::RectF>& rects); |
81 | 80 |
82 private: | 81 private: |
83 RenderWidgetHostImpl* GetRenderWidgetHostImpl(); | 82 RenderWidgetHostImpl* GetRenderWidgetHostImpl(); |
84 RenderFrameHost* GetFocusedFrame(); | 83 RenderFrameHost* GetFocusedFrame(); |
85 WebContents* GetWebContents(); | 84 WebContents* GetWebContents(); |
86 | 85 |
87 RenderWidgetHostViewAndroid* rwhva_; | 86 RenderWidgetHostViewAndroid* rwhva_; |
88 JavaObjectWeakGlobalRef java_ime_adapter_; | 87 JavaObjectWeakGlobalRef java_ime_adapter_; |
89 }; | 88 }; |
90 | 89 |
91 bool RegisterImeAdapter(JNIEnv* env); | 90 bool RegisterImeAdapter(JNIEnv* env); |
92 | 91 |
93 } // namespace content | 92 } // namespace content |
94 | 93 |
95 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | 94 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |
OLD | NEW |