| 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_ORDER_SUMMARY_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_ORDER_SUMMARY_VIEW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_ORDER_SUMMARY_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_ORDER_SUMMARY_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 "components/payments/content/payment_request_spec.h" | 10 #include "components/payments/content/payment_request_spec.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 public PaymentRequestSpec::Observer, | 24 public PaymentRequestSpec::Observer, |
| 25 public PaymentRequestState::Observer { | 25 public PaymentRequestState::Observer { |
| 26 public: | 26 public: |
| 27 // Does not take ownership of the arguments, which should outlive this object. | 27 // Does not take ownership of the arguments, which should outlive this object. |
| 28 OrderSummaryViewController(PaymentRequestSpec* spec, | 28 OrderSummaryViewController(PaymentRequestSpec* spec, |
| 29 PaymentRequestState* state, | 29 PaymentRequestState* state, |
| 30 PaymentRequestDialogView* dialog); | 30 PaymentRequestDialogView* dialog); |
| 31 ~OrderSummaryViewController() override; | 31 ~OrderSummaryViewController() override; |
| 32 | 32 |
| 33 // PaymentRequestSpec::Observer: | 33 // PaymentRequestSpec::Observer: |
| 34 void OnInvalidSpecProvided() override {} | |
| 35 void OnSpecUpdated() override; | 34 void OnSpecUpdated() override; |
| 36 | 35 |
| 37 // PaymentRequestState::Observer: | 36 // PaymentRequestState::Observer: |
| 38 void OnSelectedInformationChanged() override; | 37 void OnSelectedInformationChanged() override; |
| 39 | 38 |
| 40 private: | 39 private: |
| 41 // PaymentRequestSheetController: | 40 // PaymentRequestSheetController: |
| 42 std::unique_ptr<views::Button> CreatePrimaryButton() override; | 41 std::unique_ptr<views::Button> CreatePrimaryButton() override; |
| 43 base::string16 GetSheetTitle() override; | 42 base::string16 GetSheetTitle() override; |
| 44 void FillContentView(views::View* content_view) override; | 43 void FillContentView(views::View* content_view) override; |
| 45 void UpdatePayButtonState(bool enabled); | 44 void UpdatePayButtonState(bool enabled); |
| 46 | 45 |
| 47 views::Button* pay_button_; | 46 views::Button* pay_button_; |
| 48 | 47 |
| 49 DISALLOW_COPY_AND_ASSIGN(OrderSummaryViewController); | 48 DISALLOW_COPY_AND_ASSIGN(OrderSummaryViewController); |
| 50 }; | 49 }; |
| 51 | 50 |
| 52 } // namespace payments | 51 } // namespace payments |
| 53 | 52 |
| 54 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_ORDER_SUMMARY_VIEW_CONTROLLER_H_ | 53 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_ORDER_SUMMARY_VIEW_CONTROLLER_H_ |
| OLD | NEW |