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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java

Issue 1260583004: Gray horizontal keyboard accessory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Newton's comments Created 5 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: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java
index e0b1993a6ee9483e9dda35f1a97b304920ea9896..85b48904fbd3aebde4c89963e721c7e8fefa4a78 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillKeyboardAccessoryBridge.java
@@ -98,15 +98,25 @@ public class AutofillKeyboardAccessoryBridge implements AutofillKeyboardAccessor
/**
* @param array AutofillSuggestion array that should get a new suggestion added.
* @param index Index in the array where to place a new suggestion.
- * @param label First line of the suggestion.
+ * @param label Suggested text. The text that's going to be filled in the focused field, with a
+ * few exceptions:
+ * <ul>
+ * <li>Credit card numbers are elided, e.g. "Visa ****-1234."</li>
+ * <li>The text "CLEAR FORM" will clear the filled in text.</li>
+ * <li>Empty text can be used to display only icons, e.g. for credit card scan
+ * or editing autofill settings.</li>
+ * </ul>
+ * @param sublabel Hint for the suggested text. The text that's going to be filled in the
+ * unfocused fields of the form. If {@see label} is empty, then this must be
+ * empty too.
* @param iconId The resource ID for the icon associated with the suggestion, or 0 for no icon.
* @param suggestionId Identifier for the suggestion type.
*/
@CalledByNative
private static void addToAutofillSuggestionArray(AutofillSuggestion[] array, int index,
- String label, int iconId, int suggestionId) {
+ String label, String sublabel, int iconId, int suggestionId) {
int drawableId = iconId == 0 ? DropdownItem.NO_ICON : ResourceId.mapToDrawableId(iconId);
- array[index] = new AutofillSuggestion(label, null, drawableId, suggestionId, false);
+ array[index] = new AutofillSuggestion(label, sublabel, drawableId, suggestionId, false);
}
private native void nativeViewDismissed(long nativeAutofillKeyboardAccessoryView);
« no previous file with comments | « chrome/android/java/res/layout/main.xml ('k') | chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698