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 b339c1a1388c9a46d0106ef60d662e9c8e74c328..0fbb0d7aaff5fb6f35f8fb0c99ce5c886830bb2c 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 |
@@ -71,9 +71,15 @@ public class AutofillKeyboardAccessoryBridge |
* This function should be called at most one time. |
* @param nativeAutofillKeyboardAccessory Handle to the native counterpart. |
* @param windowAndroid The window on which to show the suggestions. |
+ * @param animationDurationMillis If 0, do not animate. Otherwise, animation duration in each |
+ * direction. We reverse animation to scroll the first suggestion |
+ * (which is a hint to call attention to the accessory) out of |
+ * the viewport at the end of the reversed animation. |
+ * @param shouldLimitLabelWidth If true, limit suggestion label width to 1/2 device's width. |
*/ |
@CalledByNative |
- private void init(long nativeAutofillKeyboardAccessory, WindowAndroid windowAndroid) { |
+ private void init(long nativeAutofillKeyboardAccessory, WindowAndroid windowAndroid, |
+ int animationDurationMillis, boolean shouldLimitLabelWidth) { |
if (windowAndroid == null || windowAndroid.getActivity().get() == null) { |
nativeViewDismissed(nativeAutofillKeyboardAccessory); |
dismissed(); |
@@ -81,7 +87,8 @@ public class AutofillKeyboardAccessoryBridge |
} |
mNativeAutofillKeyboardAccessory = nativeAutofillKeyboardAccessory; |
- mAccessoryView = new AutofillKeyboardAccessory(windowAndroid, this); |
+ mAccessoryView = new AutofillKeyboardAccessory( |
+ windowAndroid, this, animationDurationMillis, shouldLimitLabelWidth); |
mContext = windowAndroid.getActivity().get(); |
} |