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

Unified Diff: ui/android/java/src/org/chromium/ui/autofill/AutofillSuggestion.java

Issue 443193006: Show icons in Android web autofill dropdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: works Created 6 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: ui/android/java/src/org/chromium/ui/autofill/AutofillSuggestion.java
diff --git a/ui/android/java/src/org/chromium/ui/autofill/AutofillSuggestion.java b/ui/android/java/src/org/chromium/ui/autofill/AutofillSuggestion.java
index 685a6873240de6366f9676f184ed34186e2decd6..203087ab0eab05fafed29b3e134b257d41a0fb8e 100644
--- a/ui/android/java/src/org/chromium/ui/autofill/AutofillSuggestion.java
+++ b/ui/android/java/src/org/chromium/ui/autofill/AutofillSuggestion.java
@@ -4,6 +4,8 @@
package org.chromium.ui.autofill;
+import android.graphics.Bitmap;
+
import org.chromium.ui.DropdownItem;
/**
@@ -12,6 +14,7 @@ import org.chromium.ui.DropdownItem;
public class AutofillSuggestion implements DropdownItem {
final String mLabel;
final String mSublabel;
+ final Bitmap mIcon;
final int mUniqueId;
/**
@@ -20,9 +23,10 @@ public class AutofillSuggestion implements DropdownItem {
* @param label The describing label of the Autofill suggestion.
* @param uniqueId The unique id used to identify the Autofill suggestion.
*/
- public AutofillSuggestion(String name, String label, int uniqueId) {
+ public AutofillSuggestion(String name, String label, Bitmap icon, int uniqueId) {
mLabel = name;
mSublabel = label;
+ mIcon = icon;
mUniqueId = uniqueId;
}
@@ -37,6 +41,11 @@ public class AutofillSuggestion implements DropdownItem {
}
@Override
+ public Bitmap getIcon() {
+ return mIcon;
+ }
+
+ @Override
public boolean isEnabled() {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698