OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_ORDER_SUMMARY_STATE_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_ORDER_SUMMARY_STATE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/views/payments/order_summary_state_observer.h" |
| 10 #include "chrome/browser/ui/views/payments/view_stack_state.h" |
| 11 #include "ui/views/controls/button/button.h" |
| 12 |
| 13 namespace views { |
| 14 class View; |
| 15 } |
| 16 |
| 17 namespace payments { |
| 18 |
| 19 // Encapsulates view creation and event handling for the Order Summary screen of |
| 20 // the desktop WebPayments UI. |
| 21 class OrderSummaryState : public ViewStackState, |
| 22 public views::ButtonListener { |
| 23 public: |
| 24 OrderSummaryState(); |
| 25 ~OrderSummaryState() override; |
| 26 |
| 27 void AddObserver(OrderSummaryStateObserver* observer); |
| 28 void RemoveObserver(OrderSummaryStateObserver* observer); |
| 29 |
| 30 private: |
| 31 // ViewStackState: |
| 32 views::View* CreateView() override; |
| 33 |
| 34 // views::ButtonListener: |
| 35 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 36 |
| 37 base::ObserverList<OrderSummaryStateObserver> observers_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(OrderSummaryState); |
| 40 }; |
| 41 |
| 42 } // namespace payments |
| 43 |
| 44 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_ORDER_SUMMARY_STATE_H_ |
OLD | NEW |