| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_PAYMENTS_CORE_AUTOFILL_PAYMENT_INSTRUMENT_H_ | 5 #ifndef COMPONENTS_PAYMENTS_CORE_AUTOFILL_PAYMENT_INSTRUMENT_H_ |
| 6 #define COMPONENTS_PAYMENTS_CORE_AUTOFILL_PAYMENT_INSTRUMENT_H_ | 6 #define COMPONENTS_PAYMENTS_CORE_AUTOFILL_PAYMENT_INSTRUMENT_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 // PaymentInstrument: | 41 // PaymentInstrument: |
| 42 void InvokePaymentApp(PaymentInstrument::Delegate* delegate) override; | 42 void InvokePaymentApp(PaymentInstrument::Delegate* delegate) override; |
| 43 bool IsValid() override; | 43 bool IsValid() override; |
| 44 | 44 |
| 45 // autofill::payments::FullCardRequest::ResultDelegate: | 45 // autofill::payments::FullCardRequest::ResultDelegate: |
| 46 void OnFullCardRequestSucceeded(const autofill::CreditCard& card, | 46 void OnFullCardRequestSucceeded(const autofill::CreditCard& card, |
| 47 const base::string16& cvc) override; | 47 const base::string16& cvc) override; |
| 48 void OnFullCardRequestFailed() override; | 48 void OnFullCardRequestFailed() override; |
| 49 | 49 |
| 50 autofill::CreditCard* credit_card() { return &credit_card_; } |
| 51 |
| 50 private: | 52 private: |
| 51 // A copy of the card is owned by this object. | 53 // A copy of the card is owned by this object. |
| 52 autofill::CreditCard credit_card_; | 54 autofill::CreditCard credit_card_; |
| 53 // Not owned by this object, should outlive this. | 55 // Not owned by this object, should outlive this. |
| 54 const std::vector<autofill::AutofillProfile*>& billing_profiles_; | 56 const std::vector<autofill::AutofillProfile*>& billing_profiles_; |
| 55 | 57 |
| 56 const std::string app_locale_; | 58 const std::string app_locale_; |
| 57 | 59 |
| 58 PaymentInstrument::Delegate* delegate_; | 60 PaymentInstrument::Delegate* delegate_; |
| 59 PaymentRequestDelegate* payment_request_delegate_; | 61 PaymentRequestDelegate* payment_request_delegate_; |
| 60 | 62 |
| 61 base::WeakPtrFactory<AutofillPaymentInstrument> weak_ptr_factory_; | 63 base::WeakPtrFactory<AutofillPaymentInstrument> weak_ptr_factory_; |
| 62 | 64 |
| 63 DISALLOW_COPY_AND_ASSIGN(AutofillPaymentInstrument); | 65 DISALLOW_COPY_AND_ASSIGN(AutofillPaymentInstrument); |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 } // namespace payments | 68 } // namespace payments |
| 67 | 69 |
| 68 #endif // COMPONENTS_PAYMENTS_CORE_AUTOFILL_PAYMENT_INSTRUMENT_H_ | 70 #endif // COMPONENTS_PAYMENTS_CORE_AUTOFILL_PAYMENT_INSTRUMENT_H_ |
| OLD | NEW |