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> |
| 11 |
10 #include "base/android/jni_weak_ref.h" | 12 #include "base/android/jni_weak_ref.h" |
| 13 #include "ui/gfx/geometry/rect.h" |
11 | 14 |
12 namespace content { | 15 namespace content { |
13 | 16 |
14 class RenderFrameHost; | 17 class RenderFrameHost; |
15 class RenderWidgetHostImpl; | 18 class RenderWidgetHostImpl; |
16 class RenderWidgetHostViewAndroid; | 19 class RenderWidgetHostViewAndroid; |
17 class WebContents; | 20 class WebContents; |
18 struct NativeWebKeyboardEvent; | 21 struct NativeWebKeyboardEvent; |
19 | 22 |
20 // This class is in charge of dispatching key events from the java side | 23 // This class is in charge of dispatching key events from the java side |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 void Unselect(JNIEnv*, jobject); | 60 void Unselect(JNIEnv*, jobject); |
58 void SelectAll(JNIEnv*, jobject); | 61 void SelectAll(JNIEnv*, jobject); |
59 void Cut(JNIEnv*, jobject); | 62 void Cut(JNIEnv*, jobject); |
60 void Copy(JNIEnv*, jobject); | 63 void Copy(JNIEnv*, jobject); |
61 void Paste(JNIEnv*, jobject); | 64 void Paste(JNIEnv*, jobject); |
62 void ResetImeAdapter(JNIEnv*, jobject); | 65 void ResetImeAdapter(JNIEnv*, jobject); |
63 | 66 |
64 // Called from native -> java | 67 // Called from native -> java |
65 void CancelComposition(); | 68 void CancelComposition(); |
66 void FocusedNodeChanged(bool is_editable_node); | 69 void FocusedNodeChanged(bool is_editable_node); |
| 70 void SetCharacterBounds(const std::vector<gfx::Rect>& rects); |
67 | 71 |
68 private: | 72 private: |
69 RenderWidgetHostImpl* GetRenderWidgetHostImpl(); | 73 RenderWidgetHostImpl* GetRenderWidgetHostImpl(); |
70 RenderFrameHost* GetFocusedFrame(); | 74 RenderFrameHost* GetFocusedFrame(); |
71 WebContents* GetWebContents(); | 75 WebContents* GetWebContents(); |
72 | 76 |
73 RenderWidgetHostViewAndroid* rwhva_; | 77 RenderWidgetHostViewAndroid* rwhva_; |
74 JavaObjectWeakGlobalRef java_ime_adapter_; | 78 JavaObjectWeakGlobalRef java_ime_adapter_; |
75 }; | 79 }; |
76 | 80 |
77 bool RegisterImeAdapter(JNIEnv* env); | 81 bool RegisterImeAdapter(JNIEnv* env); |
78 | 82 |
79 } // namespace content | 83 } // namespace content |
80 | 84 |
81 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ | 85 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ |
OLD | NEW |