| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 jobject obj, | 48 jobject obj, |
| 49 jobject text, | 49 jobject text, |
| 50 jstring text_str, | 50 jstring text_str, |
| 51 int new_cursor_pos); | 51 int new_cursor_pos); |
| 52 void CommitText(JNIEnv*, jobject, jstring text_str); | 52 void CommitText(JNIEnv*, jobject, jstring text_str); |
| 53 void FinishComposingText(JNIEnv* env, jobject); | 53 void FinishComposingText(JNIEnv* env, jobject); |
| 54 void AttachImeAdapter(JNIEnv*, jobject java_object); | 54 void AttachImeAdapter(JNIEnv*, jobject java_object); |
| 55 void SetEditableSelectionOffsets(JNIEnv*, jobject, int start, int end); | 55 void SetEditableSelectionOffsets(JNIEnv*, jobject, int start, int end); |
| 56 void SetComposingRegion(JNIEnv*, jobject, int start, int end); | 56 void SetComposingRegion(JNIEnv*, jobject, int start, int end); |
| 57 void DeleteSurroundingText(JNIEnv*, jobject, int before, int after); | 57 void DeleteSurroundingText(JNIEnv*, jobject, int before, int after); |
| 58 void RequestTextInputStateUpdate(JNIEnv*, jobject); |
| 58 void ResetImeAdapter(JNIEnv*, jobject); | 59 void ResetImeAdapter(JNIEnv*, jobject); |
| 59 | 60 |
| 60 // Called from native -> java | 61 // Called from native -> java |
| 61 void CancelComposition(); | 62 void CancelComposition(); |
| 62 void FocusedNodeChanged(bool is_editable_node); | 63 void FocusedNodeChanged(bool is_editable_node); |
| 63 | 64 |
| 64 private: | 65 private: |
| 65 RenderWidgetHostImpl* GetRenderWidgetHostImpl(); | 66 RenderWidgetHostImpl* GetRenderWidgetHostImpl(); |
| 66 RenderFrameHost* GetFocusedFrame(); | 67 RenderFrameHost* GetFocusedFrame(); |
| 67 WebContents* GetWebContents(); | 68 WebContents* GetWebContents(); |
| 68 | 69 |
| 69 RenderWidgetHostViewAndroid* rwhva_; | 70 RenderWidgetHostViewAndroid* rwhva_; |
| 70 JavaObjectWeakGlobalRef java_ime_adapter_; | 71 JavaObjectWeakGlobalRef java_ime_adapter_; |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 bool RegisterImeAdapter(JNIEnv* env); | 74 bool RegisterImeAdapter(JNIEnv* env); |
| 74 | 75 |
| 75 } // namespace content | 76 } // namespace content |
| 76 | 77 |
| 77 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | 78 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |
| OLD | NEW |