| 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> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/strings/string16.h" |
| 13 #include "components/autofill/core/browser/autofill_profile.h" | 14 #include "components/autofill/core/browser/autofill_profile.h" |
| 14 #include "components/autofill/core/browser/credit_card.h" | 15 #include "components/autofill/core/browser/credit_card.h" |
| 15 #include "components/autofill/core/browser/payments/full_card_request.h" | 16 #include "components/autofill/core/browser/payments/full_card_request.h" |
| 16 #include "components/payments/core/address_normalizer.h" | 17 #include "components/payments/core/address_normalizer.h" |
| 17 #include "components/payments/core/payment_instrument.h" | 18 #include "components/payments/core/payment_instrument.h" |
| 18 | 19 |
| 19 namespace payments { | 20 namespace payments { |
| 20 | 21 |
| 21 class PaymentRequestDelegate; | 22 class PaymentRequestDelegate; |
| 22 | 23 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 36 const std::string& app_locale, | 37 const std::string& app_locale, |
| 37 PaymentRequestDelegate* payment_request_delegate); | 38 PaymentRequestDelegate* payment_request_delegate); |
| 38 ~AutofillPaymentInstrument() override; | 39 ~AutofillPaymentInstrument() override; |
| 39 | 40 |
| 40 // PaymentInstrument: | 41 // PaymentInstrument: |
| 41 void InvokePaymentApp(PaymentInstrument::Delegate* delegate) override; | 42 void InvokePaymentApp(PaymentInstrument::Delegate* delegate) override; |
| 42 bool IsCompleteForPayment() override; | 43 bool IsCompleteForPayment() override; |
| 43 base::string16 GetMissingInfoLabel() override; | 44 base::string16 GetMissingInfoLabel() override; |
| 44 bool IsValidForCanMakePayment() override; | 45 bool IsValidForCanMakePayment() override; |
| 45 void RecordUse() override; | 46 void RecordUse() override; |
| 47 base::string16 GetLabel() const override; |
| 48 base::string16 GetSublabel() const override; |
| 46 | 49 |
| 47 // autofill::payments::FullCardRequest::ResultDelegate: | 50 // autofill::payments::FullCardRequest::ResultDelegate: |
| 48 void OnFullCardRequestSucceeded(const autofill::CreditCard& card, | 51 void OnFullCardRequestSucceeded(const autofill::CreditCard& card, |
| 49 const base::string16& cvc) override; | 52 const base::string16& cvc) override; |
| 50 void OnFullCardRequestFailed() override; | 53 void OnFullCardRequestFailed() override; |
| 51 | 54 |
| 52 // AddressNormalizer::Delegate: | 55 // AddressNormalizer::Delegate: |
| 53 void OnAddressNormalized( | 56 void OnAddressNormalized( |
| 54 const autofill::AutofillProfile& normalized_profile) override; | 57 const autofill::AutofillProfile& normalized_profile) override; |
| 55 void OnCouldNotNormalize(const autofill::AutofillProfile& profile) override; | 58 void OnCouldNotNormalize(const autofill::AutofillProfile& profile) override; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 77 bool is_waiting_for_billing_address_normalization_; | 80 bool is_waiting_for_billing_address_normalization_; |
| 78 | 81 |
| 79 base::WeakPtrFactory<AutofillPaymentInstrument> weak_ptr_factory_; | 82 base::WeakPtrFactory<AutofillPaymentInstrument> weak_ptr_factory_; |
| 80 | 83 |
| 81 DISALLOW_COPY_AND_ASSIGN(AutofillPaymentInstrument); | 84 DISALLOW_COPY_AND_ASSIGN(AutofillPaymentInstrument); |
| 82 }; | 85 }; |
| 83 | 86 |
| 84 } // namespace payments | 87 } // namespace payments |
| 85 | 88 |
| 86 #endif // COMPONENTS_PAYMENTS_CORE_AUTOFILL_PAYMENT_INSTRUMENT_H_ | 89 #endif // COMPONENTS_PAYMENTS_CORE_AUTOFILL_PAYMENT_INSTRUMENT_H_ |
| OLD | NEW |