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

Unified Diff: blimp/client/app/android/ime_helper_dialog.cc

Issue 2292343002: Hooking up Blimp IME with BlimpContents (Closed)
Patch Set: Using Callback Created 4 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: blimp/client/app/android/ime_helper_dialog.cc
diff --git a/blimp/client/app/android/ime_helper_dialog.cc b/blimp/client/app/android/ime_helper_dialog.cc
index 698424789b6b109c6944a7759831dcc7f03bf995..2e3464058d1ad7341f09dbba8801c2fe6971fbf1 100644
--- a/blimp/client/app/android/ime_helper_dialog.cc
+++ b/blimp/client/app/android/ime_helper_dialog.cc
@@ -14,6 +14,7 @@ using base::android::JavaParamRef;
namespace blimp {
namespace client {
+namespace app {
static jlong Init(JNIEnv* env,
const JavaParamRef<jobject>& jobj,
@@ -48,7 +49,9 @@ void ImeHelperDialog::Destroy(JNIEnv* env, const JavaParamRef<jobject>& jobj) {
}
void ImeHelperDialog::OnShowImeRequested(ui::TextInputType input_type,
- const std::string& text) {
+ const std::string& text,
+ const ShowImeCallback& callback) {
+ textSubmitCallback_ = callback;
JNIEnv* env = base::android::AttachCurrentThread();
DCHECK_NE(ui::TEXT_INPUT_TYPE_NONE, input_type);
Java_ImeHelperDialog_onShowImeRequested(
@@ -65,8 +68,9 @@ void ImeHelperDialog::OnImeTextEntered(JNIEnv* env,
const JavaParamRef<jobject>& jobj,
const JavaParamRef<jstring>& text) {
std::string textInput = base::android::ConvertJavaStringToUTF8(env, text);
David Trainor- moved to gerrit 2016/08/31 05:59:09 text_input
shaktisahu 2016/08/31 17:28:21 Done.
- ime_feature_->OnImeTextEntered(textInput);
+ textSubmitCallback_.Run(textInput);
David Trainor- moved to gerrit 2016/08/31 05:59:09 drop the callback after calling it
shaktisahu 2016/08/31 17:28:21 Done.
}
+} // namespace app
} // namespace client
} // namespace blimp

Powered by Google App Engine
This is Rietveld 408576698