Chromium Code Reviews| Index: components/payments/content/payment_request.h |
| diff --git a/components/payments/content/payment_request.h b/components/payments/content/payment_request.h |
| index f947000cef0e5be7ebaffa8b991887c8bf937b30..8cdfa699860ffe29a1cc3dd4daa437017c6e31f1 100644 |
| --- a/components/payments/content/payment_request.h |
| +++ b/components/payments/content/payment_request.h |
| @@ -13,6 +13,7 @@ |
| #include "base/observer_list.h" |
| #include "components/payments/content/payment_request.mojom.h" |
| #include "components/payments/content/payment_request_delegate.h" |
| +#include "components/payments/core/payment_instrument.h" |
| #include "mojo/public/cpp/bindings/binding.h" |
| namespace autofill { |
| @@ -30,7 +31,8 @@ namespace payments { |
| class CurrencyFormatter; |
| class PaymentRequestWebContentsManager; |
| -class PaymentRequest : payments::mojom::PaymentRequest { |
| +class PaymentRequest : public mojom::PaymentRequest, |
| + public PaymentInstrument::Delegate { |
| public: |
| class Observer { |
| public: |
| @@ -57,8 +59,14 @@ class PaymentRequest : payments::mojom::PaymentRequest { |
| void Show() override; |
| void UpdateWith(payments::mojom::PaymentDetailsPtr details) override {} |
| void Abort() override; |
| - void Complete(payments::mojom::PaymentComplete result) override {} |
| - void CanMakePayment() override {} |
| + void Complete(payments::mojom::PaymentComplete result) override; |
| + void CanMakePayment() override; |
| + |
| + // PaymentInstrument::Delegate |
| + void OnInstrumentDetailsReady( |
| + const std::string& method_name, |
| + const std::string& stringified_details) override; |
| + void OnInstrumentDetailsError() override {} |
|
please use gerrit instead
2017/03/08 14:46:09
If you hide the dialog in Pay(), then OnInstrument
Mathieu
2017/03/08 18:04:25
Acknowledged.
|
| // Called when the user explicitely cancelled the flow. Will send a message |
| // to the renderer which will indirectly destroy this object (through |
| @@ -184,6 +192,8 @@ class PaymentRequest : payments::mojom::PaymentRequest { |
| // A set of supported basic card networks. |
| std::vector<std::string> supported_card_networks_; |
| bool is_ready_to_pay_; |
| + std::unique_ptr<PaymentInstrument> payment_instrument_; |
| + mojom::PaymentResponsePtr payment_response_; |
| base::ObserverList<Observer> observers_; |