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

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

Issue 24195023: Switch to sending IME selection updates early. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ted's nits Created 7 years, 2 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 | Annotate | Revision Log
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 "base/android/jni_helper.h" 10 #include "base/android/jni_helper.h"
(...skipping 23 matching lines...) Expand all
34 long event_time, int key_code, 34 long event_time, int key_code,
35 bool is_system_key, int unicode_text); 35 bool is_system_key, int unicode_text);
36 // |event_type| is a value of WebInputEvent::Type. 36 // |event_type| is a value of WebInputEvent::Type.
37 bool SendSyntheticKeyEvent(JNIEnv*, 37 bool SendSyntheticKeyEvent(JNIEnv*,
38 jobject, 38 jobject,
39 int event_type, 39 int event_type,
40 long timestamp_ms, 40 long timestamp_ms,
41 int native_key_code, 41 int native_key_code,
42 int unicode_char); 42 int unicode_char);
43 void SetComposingText(JNIEnv*, jobject, jstring text, int new_cursor_pos); 43 void SetComposingText(JNIEnv*, jobject, jstring text, int new_cursor_pos);
44 void ImeBatchStateChanged(JNIEnv*, jobject, jboolean is_begin);
45 void CommitText(JNIEnv*, jobject, jstring text); 44 void CommitText(JNIEnv*, jobject, jstring text);
46 void FinishComposingText(JNIEnv* env, jobject); 45 void FinishComposingText(JNIEnv* env, jobject);
47 void AttachImeAdapter(JNIEnv*, jobject java_object); 46 void AttachImeAdapter(JNIEnv*, jobject java_object);
48 void SetEditableSelectionOffsets(JNIEnv*, jobject, int start, int end); 47 void SetEditableSelectionOffsets(JNIEnv*, jobject, int start, int end);
49 void SetComposingRegion(JNIEnv*, jobject, int start, int end); 48 void SetComposingRegion(JNIEnv*, jobject, int start, int end);
50 void DeleteSurroundingText(JNIEnv*, jobject, int before, int after); 49 void DeleteSurroundingText(JNIEnv*, jobject, int before, int after);
51 void Unselect(JNIEnv*, jobject); 50 void Unselect(JNIEnv*, jobject);
52 void SelectAll(JNIEnv*, jobject); 51 void SelectAll(JNIEnv*, jobject);
53 void Cut(JNIEnv*, jobject); 52 void Cut(JNIEnv*, jobject);
54 void Copy(JNIEnv*, jobject); 53 void Copy(JNIEnv*, jobject);
55 void Paste(JNIEnv*, jobject); 54 void Paste(JNIEnv*, jobject);
56 void ResetImeAdapter(JNIEnv*, jobject); 55 void ResetImeAdapter(JNIEnv*, jobject);
57 56
58 // Called from native -> java 57 // Called from native -> java
59 void CancelComposition(); 58 void CancelComposition();
60 59
61 private: 60 private:
62 RenderWidgetHostImpl* GetRenderWidgetHostImpl(); 61 RenderWidgetHostImpl* GetRenderWidgetHostImpl();
63 62
64 RenderWidgetHostViewAndroid* rwhva_; 63 RenderWidgetHostViewAndroid* rwhva_;
65 JavaObjectWeakGlobalRef java_ime_adapter_; 64 JavaObjectWeakGlobalRef java_ime_adapter_;
66 }; 65 };
67 66
68 bool RegisterImeAdapter(JNIEnv* env); 67 bool RegisterImeAdapter(JNIEnv* env);
69 68
70 } // namespace content 69 } // namespace content
71 70
72 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_ 71 #endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/renderer_host/ime_adapter_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698