Chromium Code Reviews| 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..48d6c155d6f4254773d4297bfae6f9896e51790d 100644 |
| --- a/chrome/browser/ui/views/payments/payment_request_dialog.h |
| +++ b/chrome/browser/ui/views/payments/payment_request_dialog.h |
| @@ -28,7 +28,15 @@ using ControllerMap = |
| // the WebPayments flow and managing the transition between those states. |
| class PaymentRequestDialog : public views::DialogDelegateView { |
| public: |
| - explicit PaymentRequestDialog(PaymentRequest* request); |
| + class Observer { |
|
please use gerrit instead
2017/01/19 18:20:12
nit: ObserverForTest
Mathieu
2017/01/19 18:50:41
Done.
|
| + 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). |
|
please use gerrit instead
2017/01/19 18:20:12
Mention that the observer should outlive this obje
Mathieu
2017/01/19 18:50:41
Done.
|
| + PaymentRequestDialog(PaymentRequest* request, |
| + PaymentRequestDialog::Observer* observer); |
| ~PaymentRequestDialog() override; |
| // views::WidgetDelegate |
| @@ -44,6 +52,9 @@ class PaymentRequestDialog : public views::DialogDelegateView { |
| void ShowPaymentMethodSheet(); |
| void CloseDialog(); |
| + static void ShowWebModalPaymentDialog(PaymentRequestDialog* dialog, |
| + PaymentRequest* request); |
| + |
| private: |
| void ShowInitialPaymentSheet(); |
| @@ -57,6 +68,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. |
| + Observer* observer_; |
| ControllerMap controller_map_; |
| ViewStack view_stack_; |