| Index: components/payments/payment_request.h
|
| diff --git a/components/payments/payment_request.h b/components/payments/payment_request.h
|
| index cd54b7cbcebac0e7c0f69c4430af6aa567740a0c..bde059541f4ca2e7bb42e7b1e581beabbe4c8766 100644
|
| --- a/components/payments/payment_request.h
|
| +++ b/components/payments/payment_request.h
|
| @@ -39,7 +39,7 @@ class PaymentRequest : payments::mojom::PaymentRequest {
|
|
|
| // payments::mojom::PaymentRequest "stub"
|
| void Init(payments::mojom::PaymentRequestClientPtr client,
|
| - std::vector<payments::mojom::PaymentMethodDataPtr> methodData,
|
| + std::vector<payments::mojom::PaymentMethodDataPtr> method_data,
|
| payments::mojom::PaymentDetailsPtr details,
|
| payments::mojom::PaymentOptionsPtr options) override;
|
| void Show() override;
|
| @@ -101,6 +101,9 @@ class PaymentRequest : payments::mojom::PaymentRequest {
|
| }
|
|
|
| payments::mojom::PaymentDetails* details() { return details_.get(); }
|
| + const std::vector<std::string>& supported_card_networks() {
|
| + return supported_card_networks_;
|
| + }
|
| content::WebContents* web_contents() { return web_contents_; }
|
|
|
| private:
|
| @@ -111,6 +114,10 @@ class PaymentRequest : payments::mojom::PaymentRequest {
|
| // Sets the default values for the selected Shipping and Contact profiles.
|
| void SetDefaultProfileSelections();
|
|
|
| + // Validates the |method_data| and fills |supported_card_networks_|.
|
| + void PopulateValidatedMethodData(
|
| + const std::vector<payments::mojom::PaymentMethodDataPtr>& method_data);
|
| +
|
| content::WebContents* web_contents_;
|
| std::unique_ptr<PaymentRequestDelegate> delegate_;
|
| // |manager_| owns this PaymentRequest.
|
| @@ -119,6 +126,8 @@ class PaymentRequest : payments::mojom::PaymentRequest {
|
| payments::mojom::PaymentRequestClientPtr client_;
|
| payments::mojom::PaymentDetailsPtr details_;
|
| std::unique_ptr<CurrencyFormatter> currency_formatter_;
|
| + // A set of supported basic card networks.
|
| + std::vector<std::string> supported_card_networks_;
|
|
|
| // Profiles may change due to (e.g.) sync events, so profiles are cached after
|
| // loading and owned here. They are populated once only, and ordered by
|
|
|