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 2bbc77dd8fbaa747849a27b55f993b86e1858de0..40e9313f19760a90224fb95a0e1bd53a34f5ed96 100644 |
| --- a/chrome/browser/ui/views/payments/payment_request_dialog.h |
| +++ b/chrome/browser/ui/views/payments/payment_request_dialog.h |
| @@ -5,6 +5,8 @@ |
| #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ |
| #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_H_ |
| +#include <map> |
| + |
| #include "chrome/browser/ui/views/payments/view_stack.h" |
| #include "ui/views/controls/button/button.h" |
|
please use gerrit instead
2016/12/15 19:11:15
no longer used.
anthonyvd
2016/12/15 19:55:06
Done.
|
| #include "ui/views/window/dialog_delegate.h" |
| @@ -14,12 +16,15 @@ class ViewStack; |
| namespace payments { |
| class PaymentRequestImpl; |
| +class PaymentRequestSheetController; |
| + |
| +using ControllerMap = |
|
please use gerrit instead
2016/12/15 19:11:15
Who owns these View* pointers?
anthonyvd
2016/12/15 19:55:06
The ViewStack does, added a comment.
|
| + std::map<views::View*, std::unique_ptr<PaymentRequestSheetController>>; |
|
please use gerrit instead
2016/12/15 19:11:15
#include <memory> for unique_ptr.
anthonyvd
2016/12/15 19:55:06
Done.
|
| // The dialog delegate that represents a desktop WebPayments dialog. This class |
| // is responsible for displaying the view associated with the current state of |
| // the WebPayments flow and managing the transition between those states. |
| -class PaymentRequestDialog : public views::DialogDelegateView, |
| - public views::ButtonListener { |
| +class PaymentRequestDialog : public views::DialogDelegateView { |
| public: |
| explicit PaymentRequestDialog(PaymentRequestImpl* impl); |
| ~PaymentRequestDialog() override; |
| @@ -27,25 +32,26 @@ class PaymentRequestDialog : public views::DialogDelegateView, |
| // views::WidgetDelegate |
| ui::ModalType GetModalType() const override; |
| - // views::View |
| - gfx::Size GetPreferredSize() const override; |
| - |
| // views::DialogDelegate |
| bool Cancel() override; |
| + void GoBack(); |
| + void ShowOrderSummary(); |
| + |
| private: |
| void ShowInitialPaymentSheet(); |
| - void ShowOrderSummary(); |
| - void GoBack(); |
| - // views::ButtonListener: |
| - void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| + // views::View |
| + gfx::Size GetPreferredSize() const override; |
| + void ViewHierarchyChanged(const ViewHierarchyChangedDetails& details) |
| + override; |
| // Non-owned reference to the PaymentRequestImpl that initiated this dialog. |
| // Since the PaymentRequestImpl object always outlives this one, the pointer |
| // should always be valid even though there is no direct ownership |
| // relationship between the two. |
| PaymentRequestImpl* impl_; |
| + ControllerMap controller_map_; |
| ViewStack view_stack_; |
| DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialog); |
|
please use gerrit instead
2016/12/15 19:11:15
#include "base/macros.h"
anthonyvd
2016/12/15 19:55:06
Done.
|