| 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 #ifndef BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_ | 5 #ifndef BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_ |
| 6 #define BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_ | 6 #define BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 // The native component of | 22 // The native component of |
| 23 // org.chromium.blimp.core.contents.input.ImeHelperDialog | 23 // org.chromium.blimp.core.contents.input.ImeHelperDialog |
| 24 class ImeHelperDialog : public ImeFeature::Delegate { | 24 class ImeHelperDialog : public ImeFeature::Delegate { |
| 25 public: | 25 public: |
| 26 static bool RegisterJni(JNIEnv* env); | 26 static bool RegisterJni(JNIEnv* env); |
| 27 | 27 |
| 28 explicit ImeHelperDialog(ui::WindowAndroid* window); | 28 explicit ImeHelperDialog(ui::WindowAndroid* window); |
| 29 ~ImeHelperDialog() override; | 29 ~ImeHelperDialog() override; |
| 30 | 30 |
| 31 // ImeFeature::Delegate implementation. | 31 // ImeFeature::Delegate implementation. |
| 32 void OnShowImeRequested(ui::TextInputType input_type, | 32 void OnShowImeRequested(const ImeFeature::WebInputRequest& request) override; |
| 33 const std::string& text, | |
| 34 const ImeFeature::ShowImeCallback& callback) override; | |
| 35 void OnHideImeRequested() override; | 33 void OnHideImeRequested() override; |
| 36 | 34 |
| 37 // Sends the text entered from IME to the blimp engine. | 35 // Sends the text entered from IME to the blimp engine. |
| 38 void OnImeTextEntered(JNIEnv* env, | 36 void OnImeTextEntered(JNIEnv* env, |
| 39 const base::android::JavaParamRef<jobject>& jobj, | 37 const base::android::JavaParamRef<jobject>& jobj, |
| 40 const base::android::JavaParamRef<jstring>& text); | 38 const base::android::JavaParamRef<jstring>& text, |
| 39 jboolean submit); |
| 41 | 40 |
| 42 private: | 41 private: |
| 43 base::android::ScopedJavaGlobalRef<jobject> java_obj_; | 42 base::android::ScopedJavaGlobalRef<jobject> java_obj_; |
| 44 | 43 |
| 45 // A callback for the current request to be executed on text submission from | 44 // The current request is saved in order to populate the fields of the |
| 46 // the user. | 45 // subsequent response. |
| 47 ImeFeature::ShowImeCallback text_submit_callback_; | 46 ImeFeature::WebInputRequest current_request_; |
| 48 | 47 |
| 49 DISALLOW_COPY_AND_ASSIGN(ImeHelperDialog); | 48 DISALLOW_COPY_AND_ASSIGN(ImeHelperDialog); |
| 50 }; | 49 }; |
| 51 | 50 |
| 52 } // namespace client | 51 } // namespace client |
| 53 } // namespace blimp | 52 } // namespace blimp |
| 54 #endif // BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_ | 53 #endif // BLIMP_CLIENT_CORE_CONTENTS_ANDROID_IME_HELPER_DIALOG_H_ |
| OLD | NEW |