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

Unified Diff: content/browser/renderer_host/ime_adapter_android.h

Issue 10911012: Upstream Android IME support (ImeAdapter). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nits fixed; recent downstream changes applied; ime adapter added to browser_jni_registrar Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/ime_adapter_android.h
diff --git a/content/browser/renderer_host/ime_adapter_android.h b/content/browser/renderer_host/ime_adapter_android.h
index 768e9d80ea83a1d4fb42143b0885b563b5ef68ed..0f1097f6a7e3612839feaa223d1e0894f09fcb81 100644
--- a/content/browser/renderer_host/ime_adapter_android.h
+++ b/content/browser/renderer_host/ime_adapter_android.h
@@ -20,22 +20,45 @@ class ImeAdapterAndroid {
explicit ImeAdapterAndroid(RenderWidgetHostViewAndroid* rwhva);
~ImeAdapterAndroid();
- static bool RegisterImeAdapter(JNIEnv* env);
-
// Called from java -> native
// The java side is responsible to translate android KeyEvent various enums
// and values into the corresponding WebKit::WebInputEvent.
+ bool SendKeyEvent(JNIEnv* env, jobject,
+ jobject original_key_event,
+ int action, int meta_state,
+ long event_time, int key_code,
+ bool is_system_key, int unicode_text);
+ // |event_type| is a value of WebInputEvent::Type.
+ bool SendSyntheticKeyEvent(JNIEnv*,
+ jobject,
+ int event_type,
+ long timestamp_ms,
+ int native_key_code,
+ int unicode_char);
+ void SetComposingText(JNIEnv*, jobject, jstring text, int new_cursor_pos);
+ void CommitText(JNIEnv*, jobject, jstring text);
+ void AttachImeAdapter(JNIEnv*, jobject java_object);
+ void ReplaceText(JNIEnv*, jobject, jstring text);
+ void ClearFocus(JNIEnv*, jobject);
+ void SetEditableSelectionOffsets(JNIEnv*, jobject, int start, int end);
+ void SetComposingRegion(JNIEnv*, jobject, int start, int end);
+ void DeleteSurroundingText(JNIEnv*, jobject, int before, int after);
void Unselect(JNIEnv*, jobject);
void SelectAll(JNIEnv*, jobject);
void Cut(JNIEnv*, jobject);
void Copy(JNIEnv*, jobject);
void Paste(JNIEnv*, jobject);
+ // Called from native -> java
+ void CancelComposition();
+
private:
RenderWidgetHostViewAndroid* rwhva_;
jobject java_ime_adapter_;
};
+bool RegisterImeAdapter(JNIEnv* env);
+
} // namespace content
#endif // CONTENT_BROWSER_RENDERER_HOST_IME_ADAPTER_ANDROID_H_
« 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