Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: chrome/browser/ui/views/payments/payment_sheet_state.h

Issue 2528503002: [WebPayments] Implement state transitions in desktop WebPayments dialog. (Closed)
Patch Set: Factor out ViewStack and animations Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_sheet_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 Payment Sheet screen of
20 // the desktop WebPayments UI.
21 class PaymentSheetState : public ViewStackState,
22 public views::ButtonListener {
23 public:
24 PaymentSheetState();
25 ~PaymentSheetState() override;
26
27 void AddObserver(PaymentSheetStateObserver* observer);
28 void RemoveObserver(PaymentSheetStateObserver* 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<PaymentSheetStateObserver> observers_;
38
39 DISALLOW_COPY_AND_ASSIGN(PaymentSheetState);
40 };
41
42 } // namespace payments
43
44 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_SHEET_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698