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

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

Issue 2709093006: Adding new shipping address editor view to payment flow. (Closed)
Patch Set: Bot failure fix 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 22 matching lines...) Expand all
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; 37 virtual void OnContactInfoOpened() = 0;
38 38
39 virtual void OnOrderSummaryOpened() = 0; 39 virtual void OnOrderSummaryOpened() = 0;
40 40
41 virtual void OnPaymentMethodOpened() = 0; 41 virtual void OnPaymentMethodOpened() = 0;
42 42
43 virtual void OnShippingSectionOpened() = 0;
44
43 virtual void OnCreditCardEditorOpened() = 0; 45 virtual void OnCreditCardEditorOpened() = 0;
44 46
47 virtual void OnShippingAddressEditorOpened() = 0;
48
45 virtual void OnBackNavigation() = 0; 49 virtual void OnBackNavigation() = 0;
50
51 virtual void OnEditorViewUpdated() = 0;
46 }; 52 };
47 53
48 // Build a Dialog around the PaymentRequest object. |observer| is used to 54 // Build a Dialog around the PaymentRequest object. |observer| is used to
49 // be notified of dialog events as they happen (but may be NULL) and should 55 // be notified of dialog events as they happen (but may be NULL) and should
50 // outlive this object. 56 // outlive this object.
51 PaymentRequestDialogView(PaymentRequest* request, 57 PaymentRequestDialogView(PaymentRequest* request,
52 PaymentRequestDialogView::ObserverForTest* observer); 58 PaymentRequestDialogView::ObserverForTest* observer);
53 ~PaymentRequestDialogView() override; 59 ~PaymentRequestDialogView() override;
54 60
55 // views::WidgetDelegate 61 // views::WidgetDelegate
56 ui::ModalType GetModalType() const override; 62 ui::ModalType GetModalType() const override;
57 63
58 // views::DialogDelegate 64 // views::DialogDelegate
59 bool Cancel() override; 65 bool Cancel() override;
60 bool ShouldShowCloseButton() const override; 66 bool ShouldShowCloseButton() const override;
61 int GetDialogButtons() const override; 67 int GetDialogButtons() const override;
62 68
63 // payments::PaymentRequestDialog 69 // payments::PaymentRequestDialog
64 void ShowDialog() override; 70 void ShowDialog() override;
65 void CloseDialog() override; 71 void CloseDialog() override;
66 72
67 void Pay(); 73 void Pay();
68 void GoBack(); 74 void GoBack();
69 void ShowContactProfileSheet(); 75 void ShowContactProfileSheet();
70 void ShowOrderSummary(); 76 void ShowOrderSummary();
71 void ShowShippingProfileSheet(); 77 void ShowShippingProfileSheet();
72 void ShowPaymentMethodSheet(); 78 void ShowPaymentMethodSheet();
73 void ShowShippingOptionSheet(); 79 void ShowShippingOptionSheet();
74 void ShowCreditCardEditor(); 80 void ShowCreditCardEditor();
81 void ShowShippingAddressEditor();
82 void EditorViewUpdated();
75 83
76 ViewStack* view_stack_for_testing() { return &view_stack_; } 84 ViewStack* view_stack_for_testing() { return &view_stack_; }
77 85
78 private: 86 private:
79 void ShowInitialPaymentSheet(); 87 void ShowInitialPaymentSheet();
80 88
81 // views::View 89 // views::View
82 gfx::Size GetPreferredSize() const override; 90 gfx::Size GetPreferredSize() const override;
83 void ViewHierarchyChanged( 91 void ViewHierarchyChanged(
84 const ViewHierarchyChangedDetails& details) override; 92 const ViewHierarchyChangedDetails& details) override;
(...skipping 12 matching lines...) Expand all
97 // Used when the dialog is being closed to avoid re-entrancy into the 105 // Used when the dialog is being closed to avoid re-entrancy into the
98 // controller_map_. 106 // controller_map_.
99 bool being_closed_; 107 bool being_closed_;
100 108
101 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView); 109 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView);
102 }; 110 };
103 111
104 } // namespace payments 112 } // namespace payments
105 113
106 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_ 114 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698