| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "base/android/jni_string.h" | 5 #include "base/android/jni_string.h" |
| 6 #include "blimp/client/app/android/blimp_client_session_android.h" | 6 #include "blimp/client/app/android/blimp_client_session_android.h" |
| 7 #include "blimp/client/app/android/web_input_box.h" | 7 #include "blimp/client/app/android/web_input_box.h" |
| 8 #include "blimp/client/feature/ime_feature.h" | 8 #include "blimp/client/feature/ime_feature.h" |
| 9 #include "jni/WebInputBox_jni.h" | 9 #include "jni/WebInputBox_jni.h" |
| 10 #include "ui/base/ime/text_input_type.h" | 10 #include "ui/base/ime/text_input_type.h" |
| 11 | 11 |
| 12 using base::android::JavaParamRef; |
| 13 |
| 12 namespace blimp { | 14 namespace blimp { |
| 13 namespace client { | 15 namespace client { |
| 14 | 16 |
| 15 static jlong Init(JNIEnv* env, | 17 static jlong Init(JNIEnv* env, |
| 16 const JavaParamRef<jobject>& jobj, | 18 const JavaParamRef<jobject>& jobj, |
| 17 const JavaParamRef<jobject>& blimp_client_session) { | 19 const JavaParamRef<jobject>& blimp_client_session) { |
| 18 BlimpClientSession* client_session = | 20 BlimpClientSession* client_session = |
| 19 BlimpClientSessionAndroid::FromJavaObject(env, | 21 BlimpClientSessionAndroid::FromJavaObject(env, |
| 20 blimp_client_session.obj()); | 22 blimp_client_session.obj()); |
| 21 return reinterpret_cast<intptr_t>( | 23 return reinterpret_cast<intptr_t>( |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 61 |
| 60 void WebInputBox::OnImeTextEntered(JNIEnv* env, | 62 void WebInputBox::OnImeTextEntered(JNIEnv* env, |
| 61 const JavaParamRef<jobject>& jobj, | 63 const JavaParamRef<jobject>& jobj, |
| 62 const JavaParamRef<jstring>& text) { | 64 const JavaParamRef<jstring>& text) { |
| 63 std::string textInput = base::android::ConvertJavaStringToUTF8(env, text); | 65 std::string textInput = base::android::ConvertJavaStringToUTF8(env, text); |
| 64 ime_feature_->OnImeTextEntered(textInput); | 66 ime_feature_->OnImeTextEntered(textInput); |
| 65 } | 67 } |
| 66 | 68 |
| 67 } // namespace client | 69 } // namespace client |
| 68 } // namespace blimp | 70 } // namespace blimp |
| OLD | NEW |