| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 virtual void ConfirmSaveCreditCardLocally(const CreditCard& card, | 125 virtual void ConfirmSaveCreditCardLocally(const CreditCard& card, |
| 126 const base::Closure& callback) = 0; | 126 const base::Closure& callback) = 0; |
| 127 | 127 |
| 128 // Runs |callback| if the |card| should be uploaded to Payments. Displays the | 128 // Runs |callback| if the |card| should be uploaded to Payments. Displays the |
| 129 // contents of |legal_message| to the user. | 129 // contents of |legal_message| to the user. |
| 130 virtual void ConfirmSaveCreditCardToCloud( | 130 virtual void ConfirmSaveCreditCardToCloud( |
| 131 const CreditCard& card, | 131 const CreditCard& card, |
| 132 std::unique_ptr<base::DictionaryValue> legal_message, | 132 std::unique_ptr<base::DictionaryValue> legal_message, |
| 133 const base::Closure& callback) = 0; | 133 const base::Closure& callback) = 0; |
| 134 | 134 |
| 135 // Will show an infobar to get user consent for Credit Card assistive filling. |
| 136 // Will run |callback| on success. |
| 137 virtual void ConfirmCreditCardFillAssist(const CreditCard& card, |
| 138 const base::Closure& callback) = 0; |
| 139 |
| 135 // Gathers risk data and provides it to |callback|. | 140 // Gathers risk data and provides it to |callback|. |
| 136 virtual void LoadRiskData( | 141 virtual void LoadRiskData( |
| 137 const base::Callback<void(const std::string&)>& callback) = 0; | 142 const base::Callback<void(const std::string&)>& callback) = 0; |
| 138 | 143 |
| 139 // Returns true if both the platform and the device support scanning credit | 144 // Returns true if both the platform and the device support scanning credit |
| 140 // cards. Should be called before ScanCreditCard(). | 145 // cards. Should be called before ScanCreditCard(). |
| 141 virtual bool HasCreditCardScanFeature() = 0; | 146 virtual bool HasCreditCardScanFeature() = 0; |
| 142 | 147 |
| 143 // Shows the user interface for scanning a credit card. Invokes the |callback| | 148 // Shows the user interface for scanning a credit card. Invokes the |callback| |
| 144 // when a credit card is scanned successfully. Should be called only if | 149 // when a credit card is scanned successfully. Should be called only if |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 virtual bool ShouldShowSigninPromo() = 0; | 191 virtual bool ShouldShowSigninPromo() = 0; |
| 187 | 192 |
| 188 // Starts the signin flow. Should not be called if ShouldShowSigninPromo() | 193 // Starts the signin flow. Should not be called if ShouldShowSigninPromo() |
| 189 // returns false. | 194 // returns false. |
| 190 virtual void StartSigninFlow() = 0; | 195 virtual void StartSigninFlow() = 0; |
| 191 }; | 196 }; |
| 192 | 197 |
| 193 } // namespace autofill | 198 } // namespace autofill |
| 194 | 199 |
| 195 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 200 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
| OLD | NEW |