Chromium Code Reviews| Index: components/payments/payment_request.h |
| diff --git a/components/payments/payment_request.h b/components/payments/payment_request.h |
| index a2caab97efc406552fd2438d0f4e1817e0d26f92..e48c4c6a09e3fb05fd1e4e3ed64453a959742471 100644 |
| --- a/components/payments/payment_request.h |
| +++ b/components/payments/payment_request.h |
| @@ -90,10 +90,14 @@ class PaymentRequest : payments::mojom::PaymentRequest { |
| selected_contact_profile_ = profile; |
| } |
| + const std::vector<autofill::CreditCard*> credit_cards(); |
|
please use gerrit instead
2017/02/14 00:29:14
Please add a "&" (ref) to avoid copying the vector
anthonyvd
2017/02/22 20:15:21
Done.
|
| + |
| // Returns the currently selected credit card for this PaymentRequest flow. |
| // It's not guaranteed to be complete. Returns nullptr if there is no selected |
| // card. |
| - autofill::CreditCard* GetCurrentlySelectedCreditCard(); |
| + autofill::CreditCard* selected_credit_card() { |
| + return selected_credit_card_; |
| + } |
| payments::mojom::PaymentDetails* details() { return details_.get(); } |
| content::WebContents* web_contents() { return web_contents_; } |
| @@ -103,7 +107,8 @@ class PaymentRequest : payments::mojom::PaymentRequest { |
| // and stores copies of them, owned by this Request, in profile_cache_. |
| void PopulateProfileCache(); |
| - // Sets the default values for the selected Shipping and Contact profiles. |
| + // Sets the default values for the selected Shipping and Contact profiles, as |
| + // well as the selected Credit Card. |
| void SetDefaultProfileSelections(); |
| content::WebContents* web_contents_; |
| @@ -123,6 +128,7 @@ class PaymentRequest : payments::mojom::PaymentRequest { |
| std::vector<autofill::AutofillProfile*> contact_profiles_; |
| autofill::AutofillProfile* selected_shipping_profile_; |
| autofill::AutofillProfile* selected_contact_profile_; |
| + autofill::CreditCard* selected_credit_card_; |
| DISALLOW_COPY_AND_ASSIGN(PaymentRequest); |
| }; |