| Index: chrome/browser/ui/views/payments/payment_request_dialog.h
|
| diff --git a/chrome/browser/ui/views/payments/payment_request_dialog.h b/chrome/browser/ui/views/payments/payment_request_dialog.h
|
| index d11f413120d9a1d4edd6b37b088e4febbcec9ccd..e4f2ed16c6a0e88fd48166b4f3d95aee8a2e8f13 100644
|
| --- a/chrome/browser/ui/views/payments/payment_request_dialog.h
|
| +++ b/chrome/browser/ui/views/payments/payment_request_dialog.h
|
| @@ -28,7 +28,16 @@ using ControllerMap =
|
| // the WebPayments flow and managing the transition between those states.
|
| class PaymentRequestDialog : public views::DialogDelegateView {
|
| public:
|
| - explicit PaymentRequestDialog(PaymentRequest* request);
|
| + class ObserverForTest {
|
| + public:
|
| + virtual void OnDialogOpened() = 0;
|
| + };
|
| +
|
| + // Build a Dialog around the PaymentRequest object. |observer| is used to
|
| + // be notified of dialog events as they happen (but may be NULL) and should
|
| + // outlive this object.
|
| + PaymentRequestDialog(PaymentRequest* request,
|
| + PaymentRequestDialog::ObserverForTest* observer);
|
| ~PaymentRequestDialog() override;
|
|
|
| // views::WidgetDelegate
|
| @@ -44,6 +53,9 @@ class PaymentRequestDialog : public views::DialogDelegateView {
|
| void ShowPaymentMethodSheet();
|
| void CloseDialog();
|
|
|
| + static void ShowWebModalPaymentDialog(PaymentRequestDialog* dialog,
|
| + PaymentRequest* request);
|
| +
|
| private:
|
| void ShowInitialPaymentSheet();
|
|
|
| @@ -57,6 +69,8 @@ class PaymentRequestDialog : public views::DialogDelegateView {
|
| // always be valid even though there is no direct ownership relationship
|
| // between the two.
|
| PaymentRequest* request_;
|
| + // May be null.
|
| + ObserverForTest* observer_;
|
| ControllerMap controller_map_;
|
| ViewStack view_stack_;
|
|
|
|
|