| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h" | 9 #include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h" |
| 10 #include "ui/views/controls/button/vector_icon_button_delegate.h" | |
| 11 | 10 |
| 12 namespace payments { | 11 namespace payments { |
| 13 | 12 |
| 14 class PaymentRequest; | 13 class PaymentRequest; |
| 15 class PaymentRequestDialogView; | 14 class PaymentRequestDialogView; |
| 16 | 15 |
| 17 // The PaymentRequestSheetController subtype for the Payment Method screen of | 16 // The PaymentRequestSheetController subtype for the Payment Method screen of |
| 18 // the Payment Request flow. | 17 // the Payment Request flow. |
| 19 class PaymentMethodViewController : public PaymentRequestSheetController, | 18 class PaymentMethodViewController : public PaymentRequestSheetController { |
| 20 public views::VectorIconButtonDelegate { | |
| 21 public: | 19 public: |
| 22 // Does not take ownership of the arguments, which should outlive this object. | 20 // Does not take ownership of the arguments, which should outlive this object. |
| 23 PaymentMethodViewController(PaymentRequest* request, | 21 PaymentMethodViewController(PaymentRequest* request, |
| 24 PaymentRequestDialogView* dialog); | 22 PaymentRequestDialogView* dialog); |
| 25 ~PaymentMethodViewController() override; | 23 ~PaymentMethodViewController() override; |
| 26 | 24 |
| 27 // PaymentRequestSheetController: | 25 // PaymentRequestSheetController: |
| 28 std::unique_ptr<views::View> CreateView() override; | 26 std::unique_ptr<views::View> CreateView() override; |
| 29 | 27 |
| 30 private: | 28 private: |
| 31 // views::VectorIconButtonDelegate: | |
| 32 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(PaymentMethodViewController); | 29 DISALLOW_COPY_AND_ASSIGN(PaymentMethodViewController); |
| 35 }; | 30 }; |
| 36 | 31 |
| 37 } // namespace payments | 32 } // namespace payments |
| 38 | 33 |
| 39 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_ | 34 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_METHOD_VIEW_CONTROLLER_H_ |
| OLD | NEW |