| Index: components/payments/content/payment_request_spec.h
|
| diff --git a/components/payments/content/payment_request_spec.h b/components/payments/content/payment_request_spec.h
|
| index 39bbda8f7bb5bb8bd78cda5aa5a5427c15d348d5..de0187a5aaa7259afcab1281bccf8be0c884232d 100644
|
| --- a/components/payments/content/payment_request_spec.h
|
| +++ b/components/payments/content/payment_request_spec.h
|
| @@ -25,6 +25,14 @@ extern const char kBasicCardMethodName[];
|
| // certain occasions by the merchant (see API).
|
| class PaymentRequestSpec : public PaymentOptionsProvider {
|
| public:
|
| + // This enum represents which bit of information was changed to trigger an
|
| + // update roundtrip with the website.
|
| + enum class UpdateReason {
|
| + NONE,
|
| + SHIPPING_OPTION,
|
| + SHIPPING_ADDRESS,
|
| + };
|
| +
|
| // Any class call add itself as Observer via AddObserver() and receive
|
| // notification about spec events.
|
| class Observer {
|
| @@ -32,6 +40,11 @@ class PaymentRequestSpec : public PaymentOptionsProvider {
|
| // Called when the provided spec (details, options, method_data) is invalid.
|
| virtual void OnInvalidSpecProvided() = 0;
|
|
|
| + // Called when the website is notified that the user selected shipping
|
| + // options or a shipping address. This will be followed by a call to
|
| + // OnSpecUpdated or the PaymentRequest being aborted due to a timeout.
|
| + virtual void OnStartUpdating(UpdateReason reason) {}
|
| +
|
| // Called when the provided spec has changed.
|
| virtual void OnSpecUpdated() = 0;
|
|
|
| @@ -87,6 +100,8 @@ class PaymentRequestSpec : public PaymentOptionsProvider {
|
|
|
| const mojom::PaymentDetails& details() const { return *details_.get(); }
|
|
|
| + void StartWaitingForUpdateWith(UpdateReason reason);
|
| +
|
| private:
|
| friend class PaymentRequestDialogView;
|
| void add_observer_for_testing(Observer* observer_for_testing) {
|
|
|