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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 | 614 |
615 public void deleteCreditCard(String guid) { | 615 public void deleteCreditCard(String guid) { |
616 ThreadUtils.assertOnUiThread(); | 616 ThreadUtils.assertOnUiThread(); |
617 nativeRemoveByGUID(mPersonalDataManagerAndroid, guid); | 617 nativeRemoveByGUID(mPersonalDataManagerAndroid, guid); |
618 } | 618 } |
619 | 619 |
620 public void clearUnmaskedCache(String guid) { | 620 public void clearUnmaskedCache(String guid) { |
621 nativeClearUnmaskedCache(mPersonalDataManagerAndroid, guid); | 621 nativeClearUnmaskedCache(mPersonalDataManagerAndroid, guid); |
622 } | 622 } |
623 | 623 |
| 624 public String getGetAddressLabelForPaymentRequest(AutofillProfile profile) { |
| 625 return nativeGetAddressLabelForPaymentRequest(mPersonalDataManagerAndroi
d, profile); |
| 626 } |
| 627 |
624 public void getFullCard(WebContents webContents, String guid, | 628 public void getFullCard(WebContents webContents, String guid, |
625 FullCardRequestDelegate delegate) { | 629 FullCardRequestDelegate delegate) { |
626 nativeGetFullCardForPaymentRequest( | 630 nativeGetFullCardForPaymentRequest( |
627 mPersonalDataManagerAndroid, webContents, guid, delegate); | 631 mPersonalDataManagerAndroid, webContents, guid, delegate); |
628 } | 632 } |
629 | 633 |
630 @VisibleForTesting | 634 @VisibleForTesting |
631 protected void setProfileUseStatsForTesting(String guid, int count, long dat
e) { | 635 protected void setProfileUseStatsForTesting(String guid, int count, long dat
e) { |
632 ThreadUtils.assertOnUiThread(); | 636 ThreadUtils.assertOnUiThread(); |
633 nativeSetProfileUseStatsForTesting(mPersonalDataManagerAndroid, guid, co
unt, date); | 637 nativeSetProfileUseStatsForTesting(mPersonalDataManagerAndroid, guid, co
unt, date); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 private native long nativeInit(); | 683 private native long nativeInit(); |
680 private native String[] nativeGetProfileGUIDsForSettings(long nativePersonal
DataManagerAndroid); | 684 private native String[] nativeGetProfileGUIDsForSettings(long nativePersonal
DataManagerAndroid); |
681 private native String[] nativeGetProfileGUIDsToSuggest(long nativePersonalDa
taManagerAndroid); | 685 private native String[] nativeGetProfileGUIDsToSuggest(long nativePersonalDa
taManagerAndroid); |
682 private native String[] nativeGetProfileLabelsForSettings( | 686 private native String[] nativeGetProfileLabelsForSettings( |
683 long nativePersonalDataManagerAndroid); | 687 long nativePersonalDataManagerAndroid); |
684 private native String[] nativeGetProfileLabelsToSuggest(long nativePersonalD
ataManagerAndroid); | 688 private native String[] nativeGetProfileLabelsToSuggest(long nativePersonalD
ataManagerAndroid); |
685 private native AutofillProfile nativeGetProfileByGUID(long nativePersonalDat
aManagerAndroid, | 689 private native AutofillProfile nativeGetProfileByGUID(long nativePersonalDat
aManagerAndroid, |
686 String guid); | 690 String guid); |
687 private native String nativeSetProfile(long nativePersonalDataManagerAndroid
, | 691 private native String nativeSetProfile(long nativePersonalDataManagerAndroid
, |
688 AutofillProfile profile); | 692 AutofillProfile profile); |
| 693 private native String nativeGetAddressLabelForPaymentRequest( |
| 694 long nativePersonalDataManagerAndroid, AutofillProfile profile); |
689 private native String[] nativeGetCreditCardGUIDsForSettings( | 695 private native String[] nativeGetCreditCardGUIDsForSettings( |
690 long nativePersonalDataManagerAndroid); | 696 long nativePersonalDataManagerAndroid); |
691 private native String[] nativeGetCreditCardGUIDsToSuggest( | 697 private native String[] nativeGetCreditCardGUIDsToSuggest( |
692 long nativePersonalDataManagerAndroid); | 698 long nativePersonalDataManagerAndroid); |
693 private native CreditCard nativeGetCreditCardByGUID(long nativePersonalDataM
anagerAndroid, | 699 private native CreditCard nativeGetCreditCardByGUID(long nativePersonalDataM
anagerAndroid, |
694 String guid); | 700 String guid); |
695 private native String nativeSetCreditCard(long nativePersonalDataManagerAndr
oid, | 701 private native String nativeSetCreditCard(long nativePersonalDataManagerAndr
oid, |
696 CreditCard card); | 702 CreditCard card); |
697 private native void nativeAddServerCreditCardForTest(long nativePersonalData
ManagerAndroid, | 703 private native void nativeAddServerCreditCardForTest(long nativePersonalData
ManagerAndroid, |
698 CreditCard card); | 704 CreditCard card); |
699 private native void nativeRemoveByGUID(long nativePersonalDataManagerAndroid
, String guid); | 705 private native void nativeRemoveByGUID(long nativePersonalDataManagerAndroid
, String guid); |
700 private native void nativeSetProfileUseStatsForTesting( | 706 private native void nativeSetProfileUseStatsForTesting( |
701 long nativePersonalDataManagerAndroid, String guid, int count, long
date); | 707 long nativePersonalDataManagerAndroid, String guid, int count, long
date); |
702 private native void nativeSetCreditCardUseStatsForTesting( | 708 private native void nativeSetCreditCardUseStatsForTesting( |
703 long nativePersonalDataManagerAndroid, String guid, int count, long
date); | 709 long nativePersonalDataManagerAndroid, String guid, int count, long
date); |
704 private native void nativeClearUnmaskedCache( | 710 private native void nativeClearUnmaskedCache( |
705 long nativePersonalDataManagerAndroid, String guid); | 711 long nativePersonalDataManagerAndroid, String guid); |
706 private native void nativeGetFullCardForPaymentRequest(long nativePersonalDa
taManagerAndroid, | 712 private native void nativeGetFullCardForPaymentRequest(long nativePersonalDa
taManagerAndroid, |
707 WebContents webContents, String guid, FullCardRequestDelegate delega
te); | 713 WebContents webContents, String guid, FullCardRequestDelegate delega
te); |
708 private static native boolean nativeIsAutofillEnabled(); | 714 private static native boolean nativeIsAutofillEnabled(); |
709 private static native void nativeSetAutofillEnabled(boolean enable); | 715 private static native void nativeSetAutofillEnabled(boolean enable); |
710 private static native boolean nativeIsAutofillManaged(); | 716 private static native boolean nativeIsAutofillManaged(); |
711 private static native boolean nativeIsPaymentsIntegrationEnabled(); | 717 private static native boolean nativeIsPaymentsIntegrationEnabled(); |
712 private static native void nativeSetPaymentsIntegrationEnabled(boolean enabl
e); | 718 private static native void nativeSetPaymentsIntegrationEnabled(boolean enabl
e); |
713 private static native String nativeToCountryCode(String countryName); | 719 private static native String nativeToCountryCode(String countryName); |
714 } | 720 } |
OLD | NEW |