| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PAYMENT_REQUEST_H_ | 5 #ifndef COMPONENTS_PAYMENTS_PAYMENT_REQUEST_H_ |
| 6 #define COMPONENTS_PAYMENTS_PAYMENT_REQUEST_H_ | 6 #define COMPONENTS_PAYMENTS_PAYMENT_REQUEST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 void set_selected_shipping_profile(autofill::AutofillProfile* profile) { | 84 void set_selected_shipping_profile(autofill::AutofillProfile* profile) { |
| 85 selected_shipping_profile_ = profile; | 85 selected_shipping_profile_ = profile; |
| 86 } | 86 } |
| 87 autofill::AutofillProfile* selected_contact_profile() const { | 87 autofill::AutofillProfile* selected_contact_profile() const { |
| 88 return selected_contact_profile_; | 88 return selected_contact_profile_; |
| 89 } | 89 } |
| 90 void set_selected_contact_profile(autofill::AutofillProfile* profile) { | 90 void set_selected_contact_profile(autofill::AutofillProfile* profile) { |
| 91 selected_contact_profile_ = profile; | 91 selected_contact_profile_ = profile; |
| 92 } | 92 } |
| 93 | 93 |
| 94 const std::vector<autofill::CreditCard*>& credit_cards(); | 94 const std::vector<autofill::CreditCard*>& credit_cards() { |
| 95 return credit_cards_; |
| 96 } |
| 95 | 97 |
| 96 // Returns the currently selected credit card for this PaymentRequest flow. | 98 // Returns the currently selected credit card for this PaymentRequest flow. |
| 97 // It's not guaranteed to be complete. Returns nullptr if there is no selected | 99 // It's not guaranteed to be complete. Returns nullptr if there is no selected |
| 98 // card. | 100 // card. |
| 99 autofill::CreditCard* selected_credit_card() { return selected_credit_card_; } | 101 autofill::CreditCard* selected_credit_card() { return selected_credit_card_; } |
| 100 | 102 |
| 101 autofill::PersonalDataManager* personal_data_manager() { | 103 autofill::PersonalDataManager* personal_data_manager() { |
| 102 return delegate_->GetPersonalDataManager(); | 104 return delegate_->GetPersonalDataManager(); |
| 103 } | 105 } |
| 104 | 106 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 std::vector<std::unique_ptr<autofill::CreditCard>> card_cache_; | 145 std::vector<std::unique_ptr<autofill::CreditCard>> card_cache_; |
| 144 std::vector<autofill::CreditCard*> credit_cards_; | 146 std::vector<autofill::CreditCard*> credit_cards_; |
| 145 autofill::CreditCard* selected_credit_card_; | 147 autofill::CreditCard* selected_credit_card_; |
| 146 | 148 |
| 147 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); | 149 DISALLOW_COPY_AND_ASSIGN(PaymentRequest); |
| 148 }; | 150 }; |
| 149 | 151 |
| 150 } // namespace payments | 152 } // namespace payments |
| 151 | 153 |
| 152 #endif // COMPONENTS_PAYMENTS_PAYMENT_REQUEST_H_ | 154 #endif // COMPONENTS_PAYMENTS_PAYMENT_REQUEST_H_ |
| OLD | NEW |