Chromium Code Reviews| Index: chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
| diff --git a/chrome/browser/ui/views/payments/payment_request_sheet_controller.h b/chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
| index 6b0ff5d5d1440d541f7c36ebf72986375fa16616..e6cf45d9847f11f735cbacdcff055ec89ef8967a 100644 |
| --- a/chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
| +++ b/chrome/browser/ui/views/payments/payment_request_sheet_controller.h |
| @@ -9,6 +9,7 @@ |
| #include "base/logging.h" |
|
please use gerrit instead
2017/02/01 14:33:35
No longer used.
anthonyvd
2017/02/01 15:35:23
Done.
|
| #include "base/macros.h" |
| +#include "ui/views/controls/button/vector_icon_button_delegate.h" |
| namespace views { |
| class View; |
| @@ -21,19 +22,15 @@ class PaymentRequest; |
| // The base class for objects responsible for the creation and event handling in |
| // views shown in the PaymentRequestDialog. |
| -class PaymentRequestSheetController { |
| +class PaymentRequestSheetController : public views::VectorIconButtonDelegate { |
| public: |
| // Objects of this class are owned by |dialog|, so it's a non-owned pointer |
| // that should be valid throughout this object's lifetime. |
| // |request| is also not owned by this and is guaranteed to outlive dialog. |
| // Neither |request| or |dialog| should be null. |
| PaymentRequestSheetController(PaymentRequest* request, |
| - PaymentRequestDialogView* dialog) |
| - : request_(request), dialog_(dialog) { |
| - DCHECK(request_); |
| - DCHECK(dialog_); |
| - } |
| - virtual ~PaymentRequestSheetController() {} |
| + PaymentRequestDialogView* dialog); |
| + ~PaymentRequestSheetController() override {} |
| virtual std::unique_ptr<views::View> CreateView() = 0; |
| @@ -45,6 +42,10 @@ class PaymentRequestSheetController { |
| // Caller should not take ownership of the result. |
| PaymentRequestDialogView* dialog() { return dialog_; } |
| + protected: |
| + // views::VectorIconButtonDelegate: |
| + void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| + |
| private: |
| // Not owned. Will outlive this. |
| PaymentRequest* request_; |