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

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

Issue 2725623004: [Web Payments] Add the contact info screen. (Closed)
Patch Set: Address comments. Created 3 years, 9 months 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
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_PAYMENT_REQUEST_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 16 matching lines...) Expand all
27 // The dialog delegate that represents a desktop WebPayments dialog. This class 27 // The dialog delegate that represents a desktop WebPayments dialog. This class
28 // is responsible for displaying the view associated with the current state of 28 // is responsible for displaying the view associated with the current state of
29 // the WebPayments flow and managing the transition between those states. 29 // the WebPayments flow and managing the transition between those states.
30 class PaymentRequestDialogView : public views::DialogDelegateView, 30 class PaymentRequestDialogView : public views::DialogDelegateView,
31 public PaymentRequestDialog { 31 public PaymentRequestDialog {
32 public: 32 public:
33 class ObserverForTest { 33 class ObserverForTest {
34 public: 34 public:
35 virtual void OnDialogOpened() = 0; 35 virtual void OnDialogOpened() = 0;
36 36
37 virtual void OnContactInfoOpened() = 0;
38
37 virtual void OnOrderSummaryOpened() = 0; 39 virtual void OnOrderSummaryOpened() = 0;
38 40
39 virtual void OnPaymentMethodOpened() = 0; 41 virtual void OnPaymentMethodOpened() = 0;
40 42
41 virtual void OnCreditCardEditorOpened() = 0; 43 virtual void OnCreditCardEditorOpened() = 0;
42 44
43 virtual void OnBackNavigation() = 0; 45 virtual void OnBackNavigation() = 0;
44 }; 46 };
45 47
46 // Build a Dialog around the PaymentRequest object. |observer| is used to 48 // Build a Dialog around the PaymentRequest object. |observer| is used to
47 // be notified of dialog events as they happen (but may be NULL) and should 49 // be notified of dialog events as they happen (but may be NULL) and should
48 // outlive this object. 50 // outlive this object.
49 PaymentRequestDialogView(PaymentRequest* request, 51 PaymentRequestDialogView(PaymentRequest* request,
50 PaymentRequestDialogView::ObserverForTest* observer); 52 PaymentRequestDialogView::ObserverForTest* observer);
51 ~PaymentRequestDialogView() override; 53 ~PaymentRequestDialogView() override;
52 54
53 // views::WidgetDelegate 55 // views::WidgetDelegate
54 ui::ModalType GetModalType() const override; 56 ui::ModalType GetModalType() const override;
55 57
56 // views::DialogDelegate 58 // views::DialogDelegate
57 bool Cancel() override; 59 bool Cancel() override;
58 bool ShouldShowCloseButton() const override; 60 bool ShouldShowCloseButton() const override;
59 int GetDialogButtons() const override; 61 int GetDialogButtons() const override;
60 62
61 // payments::PaymentRequestDialog 63 // payments::PaymentRequestDialog
62 void ShowDialog() override; 64 void ShowDialog() override;
63 void CloseDialog() override; 65 void CloseDialog() override;
64 66
65 void GoBack(); 67 void GoBack();
68 void ShowContactInfoSheet();
66 void ShowOrderSummary(); 69 void ShowOrderSummary();
67 void ShowShippingListSheet(); 70 void ShowShippingListSheet();
68 void ShowPaymentMethodSheet(); 71 void ShowPaymentMethodSheet();
69 void ShowCreditCardEditor(); 72 void ShowCreditCardEditor();
70 73
71 ViewStack* view_stack_for_testing() { return &view_stack_; } 74 ViewStack* view_stack_for_testing() { return &view_stack_; }
72 75
73 private: 76 private:
74 void ShowInitialPaymentSheet(); 77 void ShowInitialPaymentSheet();
75 78
(...skipping 12 matching lines...) Expand all
88 91
89 // May be null. 92 // May be null.
90 ObserverForTest* observer_for_testing_; 93 ObserverForTest* observer_for_testing_;
91 94
92 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView); 95 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView);
93 }; 96 };
94 97
95 } // namespace payments 98 } // namespace payments
96 99
97 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_ 100 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698