Chromium Code Reviews| 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..a4a65da44013bf88b293c78e70f289a20fa54acb 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,14 @@ 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. |
| + * @param shouldLimitLabelWidth If true, limit suggestion label width to 1/2 device's width. |
| + * If {@param animationDurationMillis} > 0, we reverse animation to scroll the first |
|
Ted C
2017/05/17 00:04:29
style nit
If this is a continuation of shouldLimi
csashi
2017/05/17 01:14:15
Done.
|
| + * suggestion out of the viewport at the end of the reversed animation. |
| */ |
| @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 +86,8 @@ public class AutofillKeyboardAccessoryBridge |
| } |
| mNativeAutofillKeyboardAccessory = nativeAutofillKeyboardAccessory; |
| - mAccessoryView = new AutofillKeyboardAccessory(windowAndroid, this); |
| + mAccessoryView = new AutofillKeyboardAccessory( |
| + windowAndroid, this, animationDurationMillis, shouldLimitLabelWidth); |
| mContext = windowAndroid.getActivity().get(); |
| } |