Chromium Code Reviews| 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_PAYMENTS_UI_ORDER_SUMMARY_STATE_H_ | |
| 6 #define CHROME_BROWSER_PAYMENTS_UI_ORDER_SUMMARY_STATE_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "chrome/browser/payments/ui/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 Order Summary screen of | |
| 19 // the desktop WebPayments UI. | |
| 20 class OrderSummaryState : public PaymentDialogState, | |
| 21 public views::ButtonListener { | |
| 22 public: | |
| 23 class Observer { | |
| 24 public: | |
| 25 virtual void OnBackClicked() {} | |
| 26 }; | |
| 27 | |
| 28 OrderSummaryState(); | |
| 29 ~OrderSummaryState() override; | |
| 30 | |
| 31 // PaymentDialogState: | |
| 32 views::View* GetView() override; | |
| 33 | |
| 34 void AddObserver(Observer* observer); | |
| 35 void RemoveObserver(Observer* observer); | |
| 36 | |
| 37 private: | |
|
please use gerrit instead
2016/11/22 21:39:32
// InterfaceBeingImplemented:
anthonyvd
2016/11/22 22:11:19
Done.
| |
| 38 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | |
| 39 | |
| 40 views::View* view_; | |
|
please use gerrit instead
2016/11/22 21:39:32
std::unique_ptr<views:View> view_;
You own this o
anthonyvd
2016/11/22 22:11:19
I don't, its parent view does. PaymentRequestDialo
| |
| 41 base::ObserverList<Observer> observers_; | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(OrderSummaryState); | |
| 44 }; | |
| 45 | |
| 46 } // namespace payments | |
| 47 | |
| 48 #endif // CHROME_BROWSER_PAYMENTS_UI_ORDER_SUMMARY_STATE_H_ | |
| OLD | NEW |