| 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 | 670 |
| 671 public void deleteCreditCard(String guid) { | 671 public void deleteCreditCard(String guid) { |
| 672 ThreadUtils.assertOnUiThread(); | 672 ThreadUtils.assertOnUiThread(); |
| 673 nativeRemoveByGUID(mPersonalDataManagerAndroid, guid); | 673 nativeRemoveByGUID(mPersonalDataManagerAndroid, guid); |
| 674 } | 674 } |
| 675 | 675 |
| 676 public void clearUnmaskedCache(String guid) { | 676 public void clearUnmaskedCache(String guid) { |
| 677 nativeClearUnmaskedCache(mPersonalDataManagerAndroid, guid); | 677 nativeClearUnmaskedCache(mPersonalDataManagerAndroid, guid); |
| 678 } | 678 } |
| 679 | 679 |
| 680 public String getAddressLabelForPaymentRequest(AutofillProfile profile) { | 680 public String getShippingAddressLabelForPaymentRequest(AutofillProfile profi
le) { |
| 681 return nativeGetAddressLabelForPaymentRequest(mPersonalDataManagerAndroi
d, profile); | 681 return nativeGetShippingAddressLabelForPaymentRequest(mPersonalDataManag
erAndroid, profile); |
| 682 } |
| 683 |
| 684 public String getBillingAddressLabelForPaymentRequest(AutofillProfile profil
e) { |
| 685 return nativeGetBillingAddressLabelForPaymentRequest(mPersonalDataManage
rAndroid, profile); |
| 682 } | 686 } |
| 683 | 687 |
| 684 public void getFullCard(WebContents webContents, CreditCard card, | 688 public void getFullCard(WebContents webContents, CreditCard card, |
| 685 FullCardRequestDelegate delegate) { | 689 FullCardRequestDelegate delegate) { |
| 686 nativeGetFullCardForPaymentRequest(mPersonalDataManagerAndroid, webConte
nts, card, | 690 nativeGetFullCardForPaymentRequest(mPersonalDataManagerAndroid, webConte
nts, card, |
| 687 delegate); | 691 delegate); |
| 688 } | 692 } |
| 689 | 693 |
| 690 /** | 694 /** |
| 691 * Records the use of the profile associated with the specified {@code guid}
. Effectively | 695 * Records the use of the profile associated with the specified {@code guid}
. Effectively |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 private native String[] nativeGetProfileGUIDsToSuggest(long nativePersonalDa
taManagerAndroid); | 847 private native String[] nativeGetProfileGUIDsToSuggest(long nativePersonalDa
taManagerAndroid); |
| 844 private native String[] nativeGetProfileLabelsForSettings( | 848 private native String[] nativeGetProfileLabelsForSettings( |
| 845 long nativePersonalDataManagerAndroid); | 849 long nativePersonalDataManagerAndroid); |
| 846 private native String[] nativeGetProfileLabelsToSuggest(long nativePersonalD
ataManagerAndroid, | 850 private native String[] nativeGetProfileLabelsToSuggest(long nativePersonalD
ataManagerAndroid, |
| 847 boolean includeNameInLabel, boolean includeOrganizationInLabel, | 851 boolean includeNameInLabel, boolean includeOrganizationInLabel, |
| 848 boolean includeCountryInLabel); | 852 boolean includeCountryInLabel); |
| 849 private native AutofillProfile nativeGetProfileByGUID(long nativePersonalDat
aManagerAndroid, | 853 private native AutofillProfile nativeGetProfileByGUID(long nativePersonalDat
aManagerAndroid, |
| 850 String guid); | 854 String guid); |
| 851 private native String nativeSetProfile(long nativePersonalDataManagerAndroid
, | 855 private native String nativeSetProfile(long nativePersonalDataManagerAndroid
, |
| 852 AutofillProfile profile); | 856 AutofillProfile profile); |
| 853 private native String nativeGetAddressLabelForPaymentRequest( | 857 private native String nativeGetShippingAddressLabelForPaymentRequest( |
| 858 long nativePersonalDataManagerAndroid, AutofillProfile profile); |
| 859 private native String nativeGetBillingAddressLabelForPaymentRequest( |
| 854 long nativePersonalDataManagerAndroid, AutofillProfile profile); | 860 long nativePersonalDataManagerAndroid, AutofillProfile profile); |
| 855 private native String[] nativeGetCreditCardGUIDsForSettings( | 861 private native String[] nativeGetCreditCardGUIDsForSettings( |
| 856 long nativePersonalDataManagerAndroid); | 862 long nativePersonalDataManagerAndroid); |
| 857 private native String[] nativeGetCreditCardGUIDsToSuggest( | 863 private native String[] nativeGetCreditCardGUIDsToSuggest( |
| 858 long nativePersonalDataManagerAndroid); | 864 long nativePersonalDataManagerAndroid); |
| 859 private native CreditCard nativeGetCreditCardByGUID(long nativePersonalDataM
anagerAndroid, | 865 private native CreditCard nativeGetCreditCardByGUID(long nativePersonalDataM
anagerAndroid, |
| 860 String guid); | 866 String guid); |
| 861 private native CreditCard nativeGetCreditCardForNumber(long nativePersonalDa
taManagerAndroid, | 867 private native CreditCard nativeGetCreditCardForNumber(long nativePersonalDa
taManagerAndroid, |
| 862 String cardNumber); | 868 String cardNumber); |
| 863 private native String nativeSetCreditCard(long nativePersonalDataManagerAndr
oid, | 869 private native String nativeSetCreditCard(long nativePersonalDataManagerAndr
oid, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 String guid, String regionCode, NormalizedAddressRequestDelegate del
egate); | 902 String guid, String regionCode, NormalizedAddressRequestDelegate del
egate); |
| 897 private native void nativeCancelPendingAddressNormalizations( | 903 private native void nativeCancelPendingAddressNormalizations( |
| 898 long nativePersonalDataManagerAndroid); | 904 long nativePersonalDataManagerAndroid); |
| 899 private static native boolean nativeIsAutofillEnabled(); | 905 private static native boolean nativeIsAutofillEnabled(); |
| 900 private static native void nativeSetAutofillEnabled(boolean enable); | 906 private static native void nativeSetAutofillEnabled(boolean enable); |
| 901 private static native boolean nativeIsAutofillManaged(); | 907 private static native boolean nativeIsAutofillManaged(); |
| 902 private static native boolean nativeIsPaymentsIntegrationEnabled(); | 908 private static native boolean nativeIsPaymentsIntegrationEnabled(); |
| 903 private static native void nativeSetPaymentsIntegrationEnabled(boolean enabl
e); | 909 private static native void nativeSetPaymentsIntegrationEnabled(boolean enabl
e); |
| 904 private static native String nativeToCountryCode(String countryName); | 910 private static native String nativeToCountryCode(String countryName); |
| 905 } | 911 } |
| OLD | NEW |