OLD | NEW |
---|---|
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 void ShowShippingOptionSheet(); | 79 void ShowShippingOptionSheet(); |
80 void ShowCreditCardEditor(); | 80 void ShowCreditCardEditor(); |
81 void ShowShippingAddressEditor(); | 81 void ShowShippingAddressEditor(); |
82 void EditorViewUpdated(); | 82 void EditorViewUpdated(); |
83 | 83 |
84 ViewStack* view_stack_for_testing() { return &view_stack_; } | 84 ViewStack* view_stack_for_testing() { return &view_stack_; } |
85 | 85 |
86 private: | 86 private: |
87 void ShowInitialPaymentSheet(); | 87 void ShowInitialPaymentSheet(); |
88 | 88 |
89 // views::DialogDelegateView | |
Peter Kasting
2017/03/30 00:35:35
Nit: Combine with section below
| |
90 gfx::Size GetUnsnappedPreferredSize() const override; | |
91 | |
89 // views::View | 92 // views::View |
90 gfx::Size GetPreferredSize() const override; | |
91 void ViewHierarchyChanged( | 93 void ViewHierarchyChanged( |
92 const ViewHierarchyChangedDetails& details) override; | 94 const ViewHierarchyChangedDetails& details) override; |
93 | 95 |
94 // Non-owned reference to the PaymentRequest that initiated this dialog. Since | 96 // Non-owned reference to the PaymentRequest that initiated this dialog. Since |
95 // the PaymentRequest object always outlives this one, the pointer should | 97 // the PaymentRequest object always outlives this one, the pointer should |
96 // always be valid even though there is no direct ownership relationship | 98 // always be valid even though there is no direct ownership relationship |
97 // between the two. | 99 // between the two. |
98 PaymentRequest* request_; | 100 PaymentRequest* request_; |
99 ControllerMap controller_map_; | 101 ControllerMap controller_map_; |
100 ViewStack view_stack_; | 102 ViewStack view_stack_; |
101 | 103 |
102 // May be null. | 104 // May be null. |
103 ObserverForTest* observer_for_testing_; | 105 ObserverForTest* observer_for_testing_; |
104 | 106 |
105 // Used when the dialog is being closed to avoid re-entrancy into the | 107 // Used when the dialog is being closed to avoid re-entrancy into the |
106 // controller_map_. | 108 // controller_map_. |
107 bool being_closed_; | 109 bool being_closed_; |
108 | 110 |
109 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView); | 111 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView); |
110 }; | 112 }; |
111 | 113 |
112 } // namespace payments | 114 } // namespace payments |
113 | 115 |
114 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_ | 116 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_ |
OLD | NEW |