OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_ANDROID_IME_ADAPTER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_IME_ADAPTER_ANDROID_H_ |
6 #define CONTENT_BROWSER_ANDROID_IME_ADAPTER_ANDROID_H_ | 6 #define CONTENT_BROWSER_ANDROID_IME_ADAPTER_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 void FocusedNodeChanged(bool is_editable_node); | 99 void FocusedNodeChanged(bool is_editable_node); |
100 void SetCharacterBounds(const std::vector<gfx::RectF>& rects); | 100 void SetCharacterBounds(const std::vector<gfx::RectF>& rects); |
101 | 101 |
102 base::android::ScopedJavaLocalRef<jobject> java_ime_adapter_for_testing( | 102 base::android::ScopedJavaLocalRef<jobject> java_ime_adapter_for_testing( |
103 JNIEnv* env) { | 103 JNIEnv* env) { |
104 return java_ime_adapter_.get(env); | 104 return java_ime_adapter_.get(env); |
105 } | 105 } |
106 | 106 |
107 void UpdateState(const TextInputState& state); | 107 void UpdateState(const TextInputState& state); |
108 | 108 |
109 void AdvanceFocusInForm(JNIEnv*, | |
110 const base::android::JavaParamRef<jobject>&, | |
111 jint); | |
112 | |
113 private: | 109 private: |
114 RenderWidgetHostImpl* GetFocusedWidget(); | 110 RenderWidgetHostImpl* GetFocusedWidget(); |
115 RenderFrameHost* GetFocusedFrame(); | 111 RenderFrameHost* GetFocusedFrame(); |
116 std::vector<blink::WebCompositionUnderline> GetUnderlinesFromSpans( | 112 std::vector<blink::WebCompositionUnderline> GetUnderlinesFromSpans( |
117 JNIEnv* env, | 113 JNIEnv* env, |
118 const base::android::JavaParamRef<jobject>& obj, | 114 const base::android::JavaParamRef<jobject>& obj, |
119 const base::android::JavaParamRef<jobject>& text, | 115 const base::android::JavaParamRef<jobject>& text, |
120 const base::string16& text16); | 116 const base::string16& text16); |
121 | 117 |
122 // Current RenderWidgetHostView connected to this instance. Can be null. | 118 // Current RenderWidgetHostView connected to this instance. Can be null. |
123 RenderWidgetHostViewAndroid* rwhva_; | 119 RenderWidgetHostViewAndroid* rwhva_; |
124 JavaObjectWeakGlobalRef java_ime_adapter_; | 120 JavaObjectWeakGlobalRef java_ime_adapter_; |
125 }; | 121 }; |
126 | 122 |
127 bool RegisterImeAdapter(JNIEnv* env); | 123 bool RegisterImeAdapter(JNIEnv* env); |
128 | 124 |
129 } // namespace content | 125 } // namespace content |
130 | 126 |
131 #endif // CONTENT_BROWSER_ANDROID_IME_ADAPTER_ANDROID_H_ | 127 #endif // CONTENT_BROWSER_ANDROID_IME_ADAPTER_ANDROID_H_ |
OLD | NEW |