Chromium Code Reviews| Index: chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h |
| diff --git a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h |
| index 13e44b8d33eccf808aff6880439a22aac8e3ff76..4051673385eda1194576c548ed06479991c4d404 100644 |
| --- a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h |
| +++ b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h |
| @@ -27,10 +27,13 @@ class PaymentRequestDialogView; |
| class ShippingAddressEditorViewController : public EditorViewController { |
| public: |
| // Does not take ownership of the arguments, which should outlive this object. |
|
Mathieu
2017/04/24 20:05:19
it does take ownership of the callbacks :)
MAD
2017/04/25 14:23:49
Done.
|
| - ShippingAddressEditorViewController(PaymentRequestSpec* spec, |
| - PaymentRequestState* state, |
| - PaymentRequestDialogView* dialog, |
| - autofill::AutofillProfile* profile); |
| + ShippingAddressEditorViewController( |
| + PaymentRequestSpec* spec, |
| + PaymentRequestState* state, |
| + PaymentRequestDialogView* dialog, |
| + base::OnceClosure on_edited, |
| + base::OnceCallback<void(const autofill::AutofillProfile&)> on_added, |
| + autofill::AutofillProfile* profile); |
| ~ShippingAddressEditorViewController() override; |
| // EditorViewController: |
| @@ -74,6 +77,12 @@ class ShippingAddressEditorViewController : public EditorViewController { |
| }; |
| friend class ShippingAddressValidationDelegate; |
| + // Called when |profile_to_edit_| was successfully edited. |
| + base::OnceClosure on_edited_; |
| + // Called when a new profile was added. The const reference is short-lived, |
| + // and the callee should make a copy. |
| + base::OnceCallback<void(const autofill::AutofillProfile&)> on_added_; |
| + |
| // If non-nullptr, a point to an object to be edited, which should outlive |
| // this controller. |
| autofill::AutofillProfile* profile_to_edit_; |