OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.content.Context; | 7 import android.content.Context; |
8 | 8 |
9 import org.chromium.base.ThreadUtils; | 9 import org.chromium.base.ThreadUtils; |
10 import org.chromium.base.VisibleForTesting; | 10 import org.chromium.base.VisibleForTesting; |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 * | 754 * |
755 * @return Whether the normalization will happen asynchronously. | 755 * @return Whether the normalization will happen asynchronously. |
756 */ | 756 */ |
757 public boolean normalizeAddress( | 757 public boolean normalizeAddress( |
758 String guid, String regionCode, NormalizedAddressRequestDelegate del
egate) { | 758 String guid, String regionCode, NormalizedAddressRequestDelegate del
egate) { |
759 ThreadUtils.assertOnUiThread(); | 759 ThreadUtils.assertOnUiThread(); |
760 return nativeStartAddressNormalization( | 760 return nativeStartAddressNormalization( |
761 mPersonalDataManagerAndroid, guid, regionCode, delegate); | 761 mPersonalDataManagerAndroid, guid, regionCode, delegate); |
762 } | 762 } |
763 | 763 |
764 /** Cancels the pending address normalization. */ | 764 /** Cancels the pending address normalizations. */ |
765 public void cancelPendingAddressNormalization() { | 765 public void cancelPendingAddressNormalizations() { |
766 ThreadUtils.assertOnUiThread(); | 766 ThreadUtils.assertOnUiThread(); |
767 nativeCancelPendingAddressNormalization(mPersonalDataManagerAndroid); | 767 nativeCancelPendingAddressNormalizations(mPersonalDataManagerAndroid); |
768 } | 768 } |
769 | 769 |
770 /** | 770 /** |
771 * @return Whether the Autofill feature is enabled. | 771 * @return Whether the Autofill feature is enabled. |
772 */ | 772 */ |
773 public static boolean isAutofillEnabled() { | 773 public static boolean isAutofillEnabled() { |
774 return nativeIsAutofillEnabled(); | 774 return nativeIsAutofillEnabled(); |
775 } | 775 } |
776 | 776 |
777 /** | 777 /** |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 String guid); | 865 String guid); |
866 private native long nativeGetCurrentDateForTesting(long nativePersonalDataMa
nagerAndroid); | 866 private native long nativeGetCurrentDateForTesting(long nativePersonalDataMa
nagerAndroid); |
867 private native void nativeClearUnmaskedCache( | 867 private native void nativeClearUnmaskedCache( |
868 long nativePersonalDataManagerAndroid, String guid); | 868 long nativePersonalDataManagerAndroid, String guid); |
869 private native void nativeGetFullCardForPaymentRequest(long nativePersonalDa
taManagerAndroid, | 869 private native void nativeGetFullCardForPaymentRequest(long nativePersonalDa
taManagerAndroid, |
870 WebContents webContents, CreditCard card, FullCardRequestDelegate de
legate); | 870 WebContents webContents, CreditCard card, FullCardRequestDelegate de
legate); |
871 private native void nativeLoadRulesForRegion( | 871 private native void nativeLoadRulesForRegion( |
872 long nativePersonalDataManagerAndroid, String regionCode); | 872 long nativePersonalDataManagerAndroid, String regionCode); |
873 private native boolean nativeStartAddressNormalization(long nativePersonalDa
taManagerAndroid, | 873 private native boolean nativeStartAddressNormalization(long nativePersonalDa
taManagerAndroid, |
874 String guid, String regionCode, NormalizedAddressRequestDelegate del
egate); | 874 String guid, String regionCode, NormalizedAddressRequestDelegate del
egate); |
875 private native void nativeCancelPendingAddressNormalization( | 875 private native void nativeCancelPendingAddressNormalizations( |
876 long nativePersonalDataManagerAndroid); | 876 long nativePersonalDataManagerAndroid); |
877 private static native boolean nativeIsAutofillEnabled(); | 877 private static native boolean nativeIsAutofillEnabled(); |
878 private static native void nativeSetAutofillEnabled(boolean enable); | 878 private static native void nativeSetAutofillEnabled(boolean enable); |
879 private static native boolean nativeIsAutofillManaged(); | 879 private static native boolean nativeIsAutofillManaged(); |
880 private static native boolean nativeIsPaymentsIntegrationEnabled(); | 880 private static native boolean nativeIsPaymentsIntegrationEnabled(); |
881 private static native void nativeSetPaymentsIntegrationEnabled(boolean enabl
e); | 881 private static native void nativeSetPaymentsIntegrationEnabled(boolean enabl
e); |
882 private static native String nativeToCountryCode(String countryName); | 882 private static native String nativeToCountryCode(String countryName); |
883 } | 883 } |
OLD | NEW |