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_helper.h" | 10 #include "base/android/jni_helper.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
| 14 class RenderFrameHost; |
14 class RenderWidgetHostImpl; | 15 class RenderWidgetHostImpl; |
15 class RenderWidgetHostViewAndroid; | 16 class RenderWidgetHostViewAndroid; |
16 struct NativeWebKeyboardEvent; | 17 struct NativeWebKeyboardEvent; |
17 | 18 |
18 // This class is in charge of dispatching key events from the java side | 19 // This class is in charge of dispatching key events from the java side |
19 // and forward to renderer along with input method results via | 20 // and forward to renderer along with input method results via |
20 // corresponding host view. | 21 // corresponding host view. |
21 // Ownership of these objects remains on the native side (see | 22 // Ownership of these objects remains on the native side (see |
22 // RenderWidgetHostViewAndroid). | 23 // RenderWidgetHostViewAndroid). |
23 class ImeAdapterAndroid { | 24 class ImeAdapterAndroid { |
(...skipping 29 matching lines...) Expand all Loading... |
53 void Copy(JNIEnv*, jobject); | 54 void Copy(JNIEnv*, jobject); |
54 void Paste(JNIEnv*, jobject); | 55 void Paste(JNIEnv*, jobject); |
55 void ResetImeAdapter(JNIEnv*, jobject); | 56 void ResetImeAdapter(JNIEnv*, jobject); |
56 | 57 |
57 // Called from native -> java | 58 // Called from native -> java |
58 void CancelComposition(); | 59 void CancelComposition(); |
59 void FocusedNodeChanged(bool is_editable_node); | 60 void FocusedNodeChanged(bool is_editable_node); |
60 | 61 |
61 private: | 62 private: |
62 RenderWidgetHostImpl* GetRenderWidgetHostImpl(); | 63 RenderWidgetHostImpl* GetRenderWidgetHostImpl(); |
| 64 RenderFrameHost* GetRenderFrameHost(); |
63 | 65 |
64 RenderWidgetHostViewAndroid* rwhva_; | 66 RenderWidgetHostViewAndroid* rwhva_; |
65 JavaObjectWeakGlobalRef java_ime_adapter_; | 67 JavaObjectWeakGlobalRef java_ime_adapter_; |
66 }; | 68 }; |
67 | 69 |
68 bool RegisterImeAdapter(JNIEnv* env); | 70 bool RegisterImeAdapter(JNIEnv* env); |
69 | 71 |
70 } // namespace content | 72 } // namespace content |
71 | 73 |
72 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | 74 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |
OLD | NEW |