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

Unified Diff: blimp/client/core/contents/android/java/src/org/chromium/blimp/core/contents/input/ImeHelperDialog.java

Issue 2393043004: Blimp: IME should submit form with text (Closed)
Patch Set: Bundled IME params into a struct Created 4 years, 2 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/core/contents/android/java/src/org/chromium/blimp/core/contents/input/ImeHelperDialog.java
diff --git a/blimp/client/core/contents/android/java/src/org/chromium/blimp/core/contents/input/ImeHelperDialog.java b/blimp/client/core/contents/android/java/src/org/chromium/blimp/core/contents/input/ImeHelperDialog.java
index b27e24f953445256c3ca644e772dfcf351f6d68c..43503d6472717ef88819663901d62146244c47da 100644
--- a/blimp/client/core/contents/android/java/src/org/chromium/blimp/core/contents/input/ImeHelperDialog.java
+++ b/blimp/client/core/contents/android/java/src/org/chromium/blimp/core/contents/input/ImeHelperDialog.java
@@ -60,10 +60,10 @@ public class ImeHelperDialog {
* Sends the text entered from IME to blimp engine.
* @param text The text the user entered.
David Trainor- moved to gerrit 2016/10/14 16:57:40 Add @param submit and describe the behavior.
shaktisahu 2016/10/14 18:08:18 Done.
*/
- private void onImeTextEntered(String text) {
+ private void onImeTextEntered(String text, boolean submit) {
if (mNativeImeHelperDialog == 0) return;
- nativeOnImeTextEntered(mNativeImeHelperDialog, text);
+ nativeOnImeTextEntered(mNativeImeHelperDialog, text, submit);
}
@CalledByNative
@@ -92,7 +92,8 @@ public class ImeHelperDialog {
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
- onImeTextEntered(editText.getText().toString());
+ onImeTextEntered(
+ editText.getText().toString(), false);
dialog.dismiss();
}
})
@@ -120,7 +121,7 @@ public class ImeHelperDialog {
case EditorInfo.IME_ACTION_DONE:
case EditorInfo.IME_ACTION_SEARCH:
case EditorInfo.IME_ACTION_GO:
- onImeTextEntered(tv.getText().toString());
+ onImeTextEntered(tv.getText().toString(), true);
mAlertDialog.dismiss();
return true;
default:
@@ -185,5 +186,6 @@ public class ImeHelperDialog {
editText.setImeOptions(imeOptions);
}
- private native void nativeOnImeTextEntered(long nativeImeHelperDialog, String text);
+ private native void nativeOnImeTextEntered(
+ long nativeImeHelperDialog, String text, boolean submit);
}

Powered by Google App Engine
This is Rietveld 408576698