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

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: dtrainor@ comments 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..abc99467aacd38cbace61300691f74c7a364fca1 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
@@ -59,11 +59,12 @@ public class ImeHelperDialog {
/**
* Sends the text entered from IME to blimp engine.
* @param text The text the user entered.
+ * @param submit Whether or not to submit the form.
*/
- 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 +93,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 +122,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 +187,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);
}
« no previous file with comments | « blimp/client/core/contents/android/ime_helper_dialog.cc ('k') | blimp/client/core/contents/blimp_contents_view_impl_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698