X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcontent%2Fbrowser%2Frenderer_host%2Fime_adapter_android.cc;h=077e625f0ca9560da5378bc8228704d1817f5855;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=afbc43400f719ab8fc2b1464e12e8d242be2177e;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/content/browser/renderer_host/ime_adapter_android.cc b/src/content/browser/renderer_host/ime_adapter_android.cc index afbc434..077e625 100644 --- a/src/content/browser/renderer_host/ime_adapter_android.cc +++ b/src/content/browser/renderer_host/ime_adapter_android.cc @@ -21,6 +21,7 @@ #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/browser/renderer_host/render_widget_host_view_android.h" #include "content/common/frame_messages.h" +#include "content/common/input_messages.h" #include "content/common/view_messages.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/native_web_keyboard_event.h" @@ -28,6 +29,7 @@ #include "jni/ImeAdapter_jni.h" #include "third_party/WebKit/public/web/WebCompositionUnderline.h" #include "third_party/WebKit/public/web/WebInputEvent.h" +#include "third_party/WebKit/public/web/WebTextInputType.h" using base::android::AttachCurrentThread; using base::android::ConvertJavaStringToUTF16; @@ -86,6 +88,14 @@ bool RegisterImeAdapter(JNIEnv* env) { ui::TEXT_INPUT_TYPE_TELEPHONE, ui::TEXT_INPUT_TYPE_NUMBER, ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE); + Java_ImeAdapter_initializeTextInputFlags( + env, + blink::WebTextInputFlagAutocompleteOn, + blink::WebTextInputFlagAutocompleteOff, + blink::WebTextInputFlagAutocorrectOn, + blink::WebTextInputFlagAutocorrectOff, + blink::WebTextInputFlagSpellcheckOn, + blink::WebTextInputFlagSpellcheckOff); return true; } @@ -147,9 +157,10 @@ bool ImeAdapterAndroid::SendSyntheticKeyEvent(JNIEnv*, int type, long time_ms, int key_code, + int modifiers, int text) { NativeWebKeyboardEvent event(static_cast(type), - 0 /* modifiers */, time_ms / 1000.0, key_code, + modifiers, time_ms / 1000.0, key_code, text, false /* is_system_key */); rwhva_->SendKeyEvent(event); return true; @@ -276,7 +287,7 @@ void ImeAdapterAndroid::SetComposingRegion(JNIEnv*, jobject, underlines.push_back(blink::WebCompositionUnderline( 0, end - start, SK_ColorBLACK, false, SK_ColorTRANSPARENT)); - rfh->Send(new FrameMsg_SetCompositionFromExistingText( + rfh->Send(new InputMsg_SetCompositionFromExistingText( rfh->GetRoutingID(), start, end, underlines)); }