Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Side by Side Diff: content/browser/renderer_host/ime_adapter_android.h

Issue 2653283002: Route IME Events to Focused RenderWidgets (Android) (Closed)
Patch Set: Addressing creis@'s comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 bool immediateRequest, bool monitorRequest); 80 bool immediateRequest, bool monitorRequest);
81 bool RequestTextInputStateUpdate(JNIEnv*, 81 bool RequestTextInputStateUpdate(JNIEnv*,
82 const base::android::JavaParamRef<jobject>&); 82 const base::android::JavaParamRef<jobject>&);
83 83
84 // Called from native -> java 84 // Called from native -> java
85 void CancelComposition(); 85 void CancelComposition();
86 void FocusedNodeChanged(bool is_editable_node); 86 void FocusedNodeChanged(bool is_editable_node);
87 void SetCharacterBounds(const std::vector<gfx::RectF>& rects); 87 void SetCharacterBounds(const std::vector<gfx::RectF>& rects);
88 88
89 private: 89 private:
90 RenderWidgetHostImpl* GetRenderWidgetHostImpl(); 90 RenderWidgetHostImpl* GetFocusedWidget();
91 RenderFrameHost* GetFocusedFrame(); 91 RenderFrameHost* GetFocusedFrame();
92 WebContents* GetWebContents(); 92 WebContents* GetWebContents();
93 std::vector<blink::WebCompositionUnderline> GetUnderlinesFromSpans( 93 std::vector<blink::WebCompositionUnderline> GetUnderlinesFromSpans(
94 JNIEnv* env, 94 JNIEnv* env,
95 const base::android::JavaParamRef<jobject>& obj, 95 const base::android::JavaParamRef<jobject>& obj,
96 const base::android::JavaParamRef<jobject>& text, 96 const base::android::JavaParamRef<jobject>& text,
97 const base::string16& text16); 97 const base::string16& text16);
98 98
99 RenderWidgetHostViewAndroid* rwhva_; 99 RenderWidgetHostViewAndroid* rwhva_;
100 JavaObjectWeakGlobalRef java_ime_adapter_; 100 JavaObjectWeakGlobalRef java_ime_adapter_;
101 }; 101 };
102 102
103 bool RegisterImeAdapter(JNIEnv* env); 103 bool RegisterImeAdapter(JNIEnv* env);
104 104
105 } // namespace content 105 } // namespace content
106 106
107 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ 107 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698