| 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_SHIPPING_OPTION_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_OPTION_VIEW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_OPTION_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_OPTION_VIEW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/views/payments/payment_request_item_list.h" | 9 #include "chrome/browser/ui/views/payments/payment_request_item_list.h" |
| 10 #include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h" | 10 #include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h" |
| 11 #include "components/payments/content/payment_request_spec.h" | 11 #include "components/payments/content/payment_request_spec.h" |
| 12 | 12 |
| 13 namespace payments { | 13 namespace payments { |
| 14 | 14 |
| 15 class PaymentRequestState; | 15 class PaymentRequestState; |
| 16 | 16 |
| 17 class ShippingOptionViewController : public PaymentRequestSheetController, | 17 class ShippingOptionViewController : public PaymentRequestSheetController, |
| 18 public PaymentRequestSpec::Observer { | 18 public PaymentRequestSpec::Observer { |
| 19 public: | 19 public: |
| 20 ShippingOptionViewController(PaymentRequestSpec* spec, | 20 ShippingOptionViewController(PaymentRequestSpec* spec, |
| 21 PaymentRequestState* state, | 21 PaymentRequestState* state, |
| 22 PaymentRequestDialogView* dialog); | 22 PaymentRequestDialogView* dialog); |
| 23 ~ShippingOptionViewController() override; | 23 ~ShippingOptionViewController() override; |
| 24 | 24 |
| 25 // PaymentRequestSpec::Observer: | 25 // PaymentRequestSpec::Observer: |
| 26 void OnInvalidSpecProvided() override {} | |
| 27 void OnSpecUpdated() override; | 26 void OnSpecUpdated() override; |
| 28 | 27 |
| 29 private: | 28 private: |
| 30 // PaymentRequestSheetController: | 29 // PaymentRequestSheetController: |
| 31 base::string16 GetSheetTitle() override; | 30 base::string16 GetSheetTitle() override; |
| 32 void FillContentView(views::View* content_view) override; | 31 void FillContentView(views::View* content_view) override; |
| 33 std::unique_ptr<views::View> CreateExtraFooterView() override; | 32 std::unique_ptr<views::View> CreateExtraFooterView() override; |
| 34 | 33 |
| 35 PaymentRequestItemList shipping_option_list_; | 34 PaymentRequestItemList shipping_option_list_; |
| 36 | 35 |
| 37 DISALLOW_COPY_AND_ASSIGN(ShippingOptionViewController); | 36 DISALLOW_COPY_AND_ASSIGN(ShippingOptionViewController); |
| 38 }; | 37 }; |
| 39 | 38 |
| 40 } // namespace payments | 39 } // namespace payments |
| 41 | 40 |
| 42 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_OPTION_VIEW_CONTROLLER_H_ | 41 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_OPTION_VIEW_CONTROLLER_H_ |
| OLD | NEW |