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_PAYMENT_SHEET_STATE_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_STATE_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "chrome/browser/ui/views/payments/payment_dialog_state.h" | |
10 #include "ui/views/controls/button/button.h" | |
11 | |
12 namespace views { | |
13 class View; | |
14 } | |
15 | |
16 namespace payments { | |
17 | |
18 // Encapsulates view creation and event handling for the Payment Sheet screen of | |
19 // the desktop WebPayments UI. | |
20 class PaymentSheetState : public PaymentDialogState, | |
21 public views::ButtonListener { | |
22 public: | |
23 class Observer { | |
sky
2016/12/08 03:58:17
Similar comment about moving to standalone file.
anthonyvd
2016/12/08 20:31:23
Done.
| |
24 public: | |
25 virtual void OnOrderSummaryClicked() {} | |
26 }; | |
27 | |
28 PaymentSheetState(); | |
29 ~PaymentSheetState() override; | |
30 | |
31 void AddObserver(Observer* observer); | |
32 void RemoveObserver(Observer* observer); | |
33 | |
34 private: | |
35 // PaymentDialogState: | |
36 views::View* CreateView() override; | |
37 | |
38 // views::ButtonListener: | |
39 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | |
40 | |
41 base::ObserverList<Observer> observers_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(PaymentSheetState); | |
44 }; | |
45 | |
46 } // namespace payments | |
47 | |
48 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_STATE_H_ | |
OLD | NEW |