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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwAutofillClient.java

Issue 2531223003: Expanded Autofill Credit Card Popup Layout Experiment in Android. (Closed)
Patch Set: Fix merge Created 4 years 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.android_webview; 5 package org.chromium.android_webview;
6 6
7 import android.view.View; 7 import android.view.View;
8 import android.view.ViewGroup; 8 import android.view.ViewGroup;
9 9
10 import org.chromium.base.annotations.CalledByNative; 10 import org.chromium.base.annotations.CalledByNative;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 nativeDismissed(mNativeAwAutofillClient); 57 nativeDismissed(mNativeAwAutofillClient);
58 } 58 }
59 @Override 59 @Override
60 public void suggestionSelected(int listIndex) { 60 public void suggestionSelected(int listIndex) {
61 nativeSuggestionSelected(mNativeAwAutofillClient, listIn dex); 61 nativeSuggestionSelected(mNativeAwAutofillClient, listIn dex);
62 } 62 }
63 @Override 63 @Override
64 public void deleteSuggestion(int listIndex) { } 64 public void deleteSuggestion(int listIndex) { }
65 }); 65 });
66 } 66 }
67 mAutofillPopup.filterAndShow(suggestions, isRtl); 67 mAutofillPopup.filterAndShow(suggestions, isRtl, 0 /* backgroundColor */ ,
68 0 /* dividerColor */, -1 /* dropdownItemHeight */, false /* isIc onAtLeft */);
68 } 69 }
69 70
70 @CalledByNative 71 @CalledByNative
71 public void hideAutofillPopup() { 72 public void hideAutofillPopup() {
72 if (mAutofillPopup == null) return; 73 if (mAutofillPopup == null) return;
73 mAutofillPopup.dismiss(); 74 mAutofillPopup.dismiss();
74 mAutofillPopup = null; 75 mAutofillPopup = null;
75 } 76 }
76 77
77 @CalledByNative 78 @CalledByNative
78 private static AutofillSuggestion[] createAutofillSuggestionArray(int size) { 79 private static AutofillSuggestion[] createAutofillSuggestionArray(int size) {
79 return new AutofillSuggestion[size]; 80 return new AutofillSuggestion[size];
80 } 81 }
81 82
82 /** 83 /**
83 * @param array AutofillSuggestion array that should get a new suggestion ad ded. 84 * @param array AutofillSuggestion array that should get a new suggestion ad ded.
84 * @param index Index in the array where to place a new suggestion. 85 * @param index Index in the array where to place a new suggestion.
85 * @param name Name of the suggestion. 86 * @param name Name of the suggestion.
86 * @param label Label of the suggestion. 87 * @param label Label of the suggestion.
87 * @param uniqueId Unique suggestion id. 88 * @param uniqueId Unique suggestion id.
88 */ 89 */
89 @CalledByNative 90 @CalledByNative
90 private static void addToAutofillSuggestionArray(AutofillSuggestion[] array, int index, 91 private static void addToAutofillSuggestionArray(AutofillSuggestion[] array, int index,
91 String name, String label, int uniqueId) { 92 String name, String label, int uniqueId) {
92 array[index] = 93 array[index] = new AutofillSuggestion(name, label, DropdownItem.NO_ICON,
93 new AutofillSuggestion(name, label, DropdownItem.NO_ICON, unique Id, false, false); 94 false /* isIconAtLeft */, uniqueId, false /* isDeletable */,
95 false /* isMultilineLabel */, false /* isBoldLabel */);
94 } 96 }
95 97
96 private native void nativeDismissed(long nativeAwAutofillClient); 98 private native void nativeDismissed(long nativeAwAutofillClient);
97 private native void nativeSuggestionSelected(long nativeAwAutofillClient, 99 private native void nativeSuggestionSelected(long nativeAwAutofillClient,
98 int position); 100 int position);
99 } 101 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698