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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupBridge.java

Issue 443193006: Show icons in Android web autofill dropdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix indent Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.autofill; 5 package org.chromium.chrome.browser.autofill;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.os.Handler; 8 import android.os.Handler;
9 9
10 import org.chromium.base.CalledByNative; 10 import org.chromium.base.CalledByNative;
11 import org.chromium.base.JNINamespace; 11 import org.chromium.base.JNINamespace;
12 import org.chromium.chrome.browser.ResourceId;
12 import org.chromium.ui.autofill.AutofillPopup; 13 import org.chromium.ui.autofill.AutofillPopup;
13 import org.chromium.ui.autofill.AutofillPopup.AutofillPopupDelegate; 14 import org.chromium.ui.autofill.AutofillPopup.AutofillPopupDelegate;
14 import org.chromium.ui.autofill.AutofillSuggestion; 15 import org.chromium.ui.autofill.AutofillSuggestion;
15 import org.chromium.ui.base.ViewAndroid; 16 import org.chromium.ui.base.ViewAndroid;
16 import org.chromium.ui.base.ViewAndroidDelegate; 17 import org.chromium.ui.base.ViewAndroidDelegate;
17 import org.chromium.ui.base.WindowAndroid; 18 import org.chromium.ui.base.WindowAndroid;
18 19
19 /** 20 /**
20 * JNI call glue for AutofillExternalDelagate C++ and Java objects. 21 * JNI call glue for AutofillExternalDelagate C++ and Java objects.
21 */ 22 */
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 99
99 /** 100 /**
100 * @param array AutofillSuggestion array that should get a new suggestion ad ded. 101 * @param array AutofillSuggestion array that should get a new suggestion ad ded.
101 * @param index Index in the array where to place a new suggestion. 102 * @param index Index in the array where to place a new suggestion.
102 * @param label First line of the suggestion. 103 * @param label First line of the suggestion.
103 * @param sublabel Second line of the suggestion. 104 * @param sublabel Second line of the suggestion.
104 * @param uniqueId Unique suggestion id. 105 * @param uniqueId Unique suggestion id.
105 */ 106 */
106 @CalledByNative 107 @CalledByNative
107 private static void addToAutofillSuggestionArray(AutofillSuggestion[] array, int index, 108 private static void addToAutofillSuggestionArray(AutofillSuggestion[] array, int index,
108 String label, String sublabel, int uniqueId) { 109 String label, String sublabel, int iconId, int suggestionId) {
109 array[index] = new AutofillSuggestion(label, sublabel, uniqueId); 110 int drawableId = iconId == 0 ? 0 : ResourceId.mapToDrawableId(iconId);
111 array[index] = new AutofillSuggestion(label, sublabel, drawableId, sugge stionId);
110 } 112 }
111 113
112 private native void nativePopupDismissed(long nativeAutofillPopupViewAndroid ); 114 private native void nativePopupDismissed(long nativeAutofillPopupViewAndroid );
113 private native void nativeSuggestionSelected(long nativeAutofillPopupViewAnd roid, 115 private native void nativeSuggestionSelected(long nativeAutofillPopupViewAnd roid,
114 int listIndex); 116 int listIndex);
115 } 117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698