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