| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SHEET_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_VIEW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_VIEW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h" | 11 #include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h" |
| 12 #include "ui/views/controls/button/vector_icon_button_delegate.h" | |
| 13 | 12 |
| 14 namespace payments { | 13 namespace payments { |
| 15 | 14 |
| 16 class PaymentRequest; | 15 class PaymentRequest; |
| 17 class PaymentRequestDialogView; | 16 class PaymentRequestDialogView; |
| 18 | 17 |
| 19 // The PaymentRequestSheetController subtype for the Payment Sheet screen of the | 18 // The PaymentRequestSheetController subtype for the Payment Sheet screen of the |
| 20 // Payment Request dialog. | 19 // Payment Request dialog. |
| 21 class PaymentSheetViewController : public PaymentRequestSheetController, | 20 class PaymentSheetViewController : public PaymentRequestSheetController { |
| 22 public views::VectorIconButtonDelegate { | |
| 23 public: | 21 public: |
| 24 // Does not take ownership of the arguments, which should outlive this object. | 22 // Does not take ownership of the arguments, which should outlive this object. |
| 25 PaymentSheetViewController(PaymentRequest* request, | 23 PaymentSheetViewController(PaymentRequest* request, |
| 26 PaymentRequestDialogView* dialog); | 24 PaymentRequestDialogView* dialog); |
| 27 ~PaymentSheetViewController() override; | 25 ~PaymentSheetViewController() override; |
| 28 | 26 |
| 29 // PaymentRequestSheetController: | 27 // PaymentRequestSheetController: |
| 30 std::unique_ptr<views::View> CreateView() override; | 28 std::unique_ptr<views::View> CreateView() override; |
| 31 | 29 |
| 32 private: | 30 private: |
| 33 // views::VectorIconButtonDelegate: | 31 // PaymentRequestSheetController: |
| 34 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 32 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 35 | 33 |
| 36 std::unique_ptr<views::View> CreateOrderSummarySectionContent(); | 34 std::unique_ptr<views::View> CreateOrderSummarySectionContent(); |
| 37 std::unique_ptr<views::View> CreateShippingSectionContent(); | 35 std::unique_ptr<views::View> CreateShippingSectionContent(); |
| 38 std::unique_ptr<views::Button> CreateShippingRow(); | 36 std::unique_ptr<views::Button> CreateShippingRow(); |
| 39 std::unique_ptr<views::Button> CreatePaymentSheetSummaryRow(); | 37 std::unique_ptr<views::Button> CreatePaymentSheetSummaryRow(); |
| 40 std::unique_ptr<views::Button> CreatePaymentMethodRow(); | 38 std::unique_ptr<views::Button> CreatePaymentMethodRow(); |
| 41 std::unique_ptr<views::View> CreateContactInfoSectionContent(); | 39 std::unique_ptr<views::View> CreateContactInfoSectionContent(); |
| 42 std::unique_ptr<views::Button> CreateContactInfoRow(); | 40 std::unique_ptr<views::Button> CreateContactInfoRow(); |
| 43 | 41 |
| 44 const int widest_name_column_view_width_; | 42 const int widest_name_column_view_width_; |
| 45 | 43 |
| 46 DISALLOW_COPY_AND_ASSIGN(PaymentSheetViewController); | 44 DISALLOW_COPY_AND_ASSIGN(PaymentSheetViewController); |
| 47 }; | 45 }; |
| 48 | 46 |
| 49 } // namespace payments | 47 } // namespace payments |
| 50 | 48 |
| 51 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_VIEW_CONTROLLER_H_ | 49 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_VIEW_CONTROLLER_H_ |
| OLD | NEW |