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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 }; | 79 }; |
80 | 80 |
81 enum UnmaskCardReason { | 81 enum UnmaskCardReason { |
82 // The card is being unmasked for PaymentRequest. | 82 // The card is being unmasked for PaymentRequest. |
83 UNMASK_FOR_PAYMENT_REQUEST, | 83 UNMASK_FOR_PAYMENT_REQUEST, |
84 | 84 |
85 // The card is being unmasked for Autofill. | 85 // The card is being unmasked for Autofill. |
86 UNMASK_FOR_AUTOFILL, | 86 UNMASK_FOR_AUTOFILL, |
87 }; | 87 }; |
88 | 88 |
89 typedef base::Callback<void(const base::string16& /* card number */, | 89 typedef base::Callback<void(const CreditCard&)> CreditCardScanCallback; |
90 int /* exp month */, | |
91 int /* exp year */)> CreditCardScanCallback; | |
92 | 90 |
93 virtual ~AutofillClient() {} | 91 virtual ~AutofillClient() {} |
94 | 92 |
95 // Gets the PersonalDataManager instance associated with the client. | 93 // Gets the PersonalDataManager instance associated with the client. |
96 virtual PersonalDataManager* GetPersonalDataManager() = 0; | 94 virtual PersonalDataManager* GetPersonalDataManager() = 0; |
97 | 95 |
98 // Gets the AutofillWebDataService instance associated with the client. | 96 // Gets the AutofillWebDataService instance associated with the client. |
99 virtual scoped_refptr<AutofillWebDataService> GetDatabase() = 0; | 97 virtual scoped_refptr<AutofillWebDataService> GetDatabase() = 0; |
100 | 98 |
101 // Gets the preferences associated with the client. | 99 // Gets the preferences associated with the client. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 virtual bool ShouldShowSigninPromo() = 0; | 189 virtual bool ShouldShowSigninPromo() = 0; |
192 | 190 |
193 // Starts the signin flow. Should not be called if ShouldShowSigninPromo() | 191 // Starts the signin flow. Should not be called if ShouldShowSigninPromo() |
194 // returns false. | 192 // returns false. |
195 virtual void StartSigninFlow() = 0; | 193 virtual void StartSigninFlow() = 0; |
196 }; | 194 }; |
197 | 195 |
198 } // namespace autofill | 196 } // namespace autofill |
199 | 197 |
200 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 198 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
OLD | NEW |