| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 virtual void OnBackToPaymentSheetNavigation() = 0; | 71 virtual void OnBackToPaymentSheetNavigation() = 0; |
| 72 | 72 |
| 73 virtual void OnEditorViewUpdated() = 0; | 73 virtual void OnEditorViewUpdated() = 0; |
| 74 | 74 |
| 75 virtual void OnErrorMessageShown() = 0; | 75 virtual void OnErrorMessageShown() = 0; |
| 76 | 76 |
| 77 virtual void OnSpecDoneUpdating() = 0; | 77 virtual void OnSpecDoneUpdating() = 0; |
| 78 | 78 |
| 79 virtual void OnCvcPromptShown() = 0; | 79 virtual void OnCvcPromptShown() = 0; |
| 80 |
| 81 virtual void OnEditorValidationError() = 0; |
| 80 }; | 82 }; |
| 81 | 83 |
| 82 // Build a Dialog around the PaymentRequest object. |observer| is used to | 84 // Build a Dialog around the PaymentRequest object. |observer| is used to |
| 83 // be notified of dialog events as they happen (but may be NULL) and should | 85 // be notified of dialog events as they happen (but may be NULL) and should |
| 84 // outlive this object. | 86 // outlive this object. |
| 85 PaymentRequestDialogView(PaymentRequest* request, | 87 PaymentRequestDialogView(PaymentRequest* request, |
| 86 PaymentRequestDialogView::ObserverForTest* observer); | 88 PaymentRequestDialogView::ObserverForTest* observer); |
| 87 ~PaymentRequestDialogView() override; | 89 ~PaymentRequestDialogView() override; |
| 88 | 90 |
| 89 // views::View | 91 // views::View |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 const autofill::CreditCard& credit_card, | 158 const autofill::CreditCard& credit_card, |
| 157 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> | 159 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> |
| 158 result_delegate, | 160 result_delegate, |
| 159 content::WebContents* web_contents) override; | 161 content::WebContents* web_contents) override; |
| 160 | 162 |
| 161 // Shows/Hides a full dialog spinner with the "processing" label that doesn't | 163 // Shows/Hides a full dialog spinner with the "processing" label that doesn't |
| 162 // offer a way of closing the dialog. | 164 // offer a way of closing the dialog. |
| 163 void ShowProcessingSpinner(); | 165 void ShowProcessingSpinner(); |
| 164 void HideProcessingSpinner(); | 166 void HideProcessingSpinner(); |
| 165 | 167 |
| 168 // Called when there is a validation error in an editor. |
| 169 void OnEditorValidationError(); |
| 170 |
| 166 Profile* GetProfile(); | 171 Profile* GetProfile(); |
| 167 | 172 |
| 168 ViewStack* view_stack_for_testing() { return view_stack_.get(); } | 173 ViewStack* view_stack_for_testing() { return view_stack_.get(); } |
| 169 views::View* throbber_overlay_for_testing() { return &throbber_overlay_; } | 174 views::View* throbber_overlay_for_testing() { return &throbber_overlay_; } |
| 170 | 175 |
| 171 private: | 176 private: |
| 172 void ShowInitialPaymentSheet(); | 177 void ShowInitialPaymentSheet(); |
| 173 void SetupSpinnerOverlay(); | 178 void SetupSpinnerOverlay(); |
| 174 | 179 |
| 175 // views::View | 180 // views::View |
| (...skipping 20 matching lines...) Expand all Loading... |
| 196 // Used when the dialog is being closed to avoid re-entrancy into the | 201 // Used when the dialog is being closed to avoid re-entrancy into the |
| 197 // controller_map_. | 202 // controller_map_. |
| 198 bool being_closed_; | 203 bool being_closed_; |
| 199 | 204 |
| 200 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView); | 205 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView); |
| 201 }; | 206 }; |
| 202 | 207 |
| 203 } // namespace payments | 208 } // namespace payments |
| 204 | 209 |
| 205 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_ | 210 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_ |
| OLD | NEW |