| 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 |
| 11 #include "base/callback_forward.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "chrome/browser/ui/views/payments/view_stack.h" | 13 #include "chrome/browser/ui/views/payments/view_stack.h" |
| 13 #include "components/payments/content/payment_request_dialog.h" | 14 #include "components/payments/content/payment_request_dialog.h" |
| 14 #include "components/payments/content/payment_request_spec.h" | 15 #include "components/payments/content/payment_request_spec.h" |
| 15 #include "ui/views/controls/throbber.h" | 16 #include "ui/views/controls/throbber.h" |
| 16 #include "ui/views/window/dialog_delegate.h" | 17 #include "ui/views/window/dialog_delegate.h" |
| 17 | 18 |
| 18 namespace autofill { | 19 namespace autofill { |
| 19 class AutofillProfile; | 20 class AutofillProfile; |
| 20 class CreditCard; | 21 class CreditCard; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void OnSpecUpdated() override; | 93 void OnSpecUpdated() override; |
| 93 | 94 |
| 94 void Pay(); | 95 void Pay(); |
| 95 void GoBack(); | 96 void GoBack(); |
| 96 void ShowContactProfileSheet(); | 97 void ShowContactProfileSheet(); |
| 97 void ShowOrderSummary(); | 98 void ShowOrderSummary(); |
| 98 void ShowShippingProfileSheet(); | 99 void ShowShippingProfileSheet(); |
| 99 void ShowPaymentMethodSheet(); | 100 void ShowPaymentMethodSheet(); |
| 100 void ShowShippingOptionSheet(); | 101 void ShowShippingOptionSheet(); |
| 101 // |credit_card| is the card to be edited, or nullptr for adding a card. | 102 // |credit_card| is the card to be edited, or nullptr for adding a card. |
| 102 void ShowCreditCardEditor(autofill::CreditCard* credit_card = nullptr); | 103 // |on_edited| is called when |credit_card| was successfully edited, and |
| 104 // |on_added| is called when a new credit card was added (the reference is |
| 105 // short-lived; callee should make a copy of the CreditCard object). |
| 106 void ShowCreditCardEditor( |
| 107 base::OnceClosure on_edited, |
| 108 base::OnceCallback<void(const autofill::CreditCard&)> on_added, |
| 109 autofill::CreditCard* credit_card = nullptr); |
| 103 // |profile| is the address to be edited, or nullptr for adding an address. | 110 // |profile| is the address to be edited, or nullptr for adding an address. |
| 104 void ShowShippingAddressEditor(autofill::AutofillProfile* profile = nullptr); | 111 void ShowShippingAddressEditor(autofill::AutofillProfile* profile = nullptr); |
| 105 void EditorViewUpdated(); | 112 void EditorViewUpdated(); |
| 106 | 113 |
| 107 void ShowCvcUnmaskPrompt( | 114 void ShowCvcUnmaskPrompt( |
| 108 const autofill::CreditCard& credit_card, | 115 const autofill::CreditCard& credit_card, |
| 109 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> | 116 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> |
| 110 result_delegate, | 117 result_delegate, |
| 111 content::WebContents* web_contents) override; | 118 content::WebContents* web_contents) override; |
| 112 | 119 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Used when the dialog is being closed to avoid re-entrancy into the | 151 // Used when the dialog is being closed to avoid re-entrancy into the |
| 145 // controller_map_. | 152 // controller_map_. |
| 146 bool being_closed_; | 153 bool being_closed_; |
| 147 | 154 |
| 148 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView); | 155 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDialogView); |
| 149 }; | 156 }; |
| 150 | 157 |
| 151 } // namespace payments | 158 } // namespace payments |
| 152 | 159 |
| 153 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_ | 160 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_DIALOG_VIEW_H_ |
| OLD | NEW |