| Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupGlue.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupGlue.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupGlue.java
|
| index 34dca60c8e769915eedab1e453bc99d5a119ff41..c22da3c37b92cf3ce55ced7f3db34d25231b0ec2 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupGlue.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillPopupGlue.java
|
| @@ -7,7 +7,8 @@ package org.chromium.chrome.browser.autofill;
|
| import org.chromium.base.CalledByNative;
|
| import org.chromium.base.JNINamespace;
|
| import org.chromium.chrome.browser.autofill.AutofillPopup.AutofillPopupDelegate;
|
| -import org.chromium.content.browser.ContainerViewDelegate;
|
| +import org.chromium.ui.ContainerViewDelegate;
|
| +import org.chromium.ui.NativeView;
|
| import org.chromium.ui.gfx.NativeWindow;
|
|
|
| /**
|
| @@ -26,9 +27,9 @@ public class AutofillPopupGlue implements AutofillPopupDelegate{
|
|
|
| @CalledByNative
|
| private static AutofillPopupGlue create(int nativeAutofillPopupViewAndroid,
|
| - NativeWindow nativeWindow, ContainerViewDelegate containerViewDelegate) {
|
| + NativeWindow nativeWindow, NativeView nativeView) {
|
| return new AutofillPopupGlue(nativeAutofillPopupViewAndroid, nativeWindow,
|
| - containerViewDelegate);
|
| + nativeView.mContainerViewDelegate);
|
| }
|
|
|
| @Override
|
| @@ -70,17 +71,24 @@ public class AutofillPopupGlue implements AutofillPopupDelegate{
|
| mAutofillPopup.setAnchorRect(x, y, width, height);
|
| }
|
|
|
| + // Helper methods for AutofillSuggestion
|
| +
|
| + @CalledByNative
|
| + private static AutofillSuggestion[] createAutofillSuggestionArray(int size) {
|
| + return new AutofillSuggestion[size];
|
| + }
|
| +
|
| /**
|
| - * Creates an Autofill Suggestion object with specified name and label.
|
| + * @param array AutofillSuggestion array that should get a new suggestion added.
|
| + * @param index Index in the array where to place a new suggestion.
|
| * @param name Name of the suggestion.
|
| * @param label Label of the suggestion.
|
| * @param uniqueId Unique suggestion id.
|
| - * @return The AutofillSuggestion object with the specified data.
|
| */
|
| @CalledByNative
|
| - private static AutofillSuggestion createAutofillSuggestion(String name, String label,
|
| - int uniqueId) {
|
| - return new AutofillSuggestion(name, label, uniqueId);
|
| + private static void addToAutofillSuggestionArray(AutofillSuggestion[] array, int index,
|
| + String name, String label, int uniqueId) {
|
| + array[index] = new AutofillSuggestion(name, label, uniqueId);
|
| }
|
|
|
| private native void nativeRequestHide(int nativeAutofillPopupViewAndroid);
|
|
|