| Index: chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
|
| diff --git a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
|
| index d10a2fbdb0d37438ef6bdaeedf2598d5f34a1553..3ee16784e6004a5cbc1ec9afefc31b07ee6d3718 100644
|
| --- a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
|
| +++ b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
|
| @@ -10,6 +10,7 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "base/callback_forward.h"
|
| #include "base/macros.h"
|
| #include "chrome/browser/ui/views/payments/editor_view_controller.h"
|
| #include "chrome/browser/ui/views/payments/validation_delegate.h"
|
| @@ -32,10 +33,13 @@ class CreditCardEditorViewController : public EditorViewController {
|
| // Additionally, |credit_card| could be nullptr if we are adding a card. Else,
|
| // it's a valid pointer to a card that needs to be updated, and which will
|
| // outlive this controller.
|
| - CreditCardEditorViewController(PaymentRequestSpec* spec,
|
| - PaymentRequestState* state,
|
| - PaymentRequestDialogView* dialog,
|
| - autofill::CreditCard* credit_card);
|
| + CreditCardEditorViewController(
|
| + PaymentRequestSpec* spec,
|
| + PaymentRequestState* state,
|
| + PaymentRequestDialogView* dialog,
|
| + base::OnceClosure on_edited,
|
| + base::OnceCallback<void(const autofill::CreditCard&)> on_added,
|
| + autofill::CreditCard* credit_card);
|
| ~CreditCardEditorViewController() override;
|
|
|
| // EditorViewController:
|
| @@ -82,6 +86,12 @@ class CreditCardEditorViewController : public EditorViewController {
|
| DISALLOW_COPY_AND_ASSIGN(CreditCardValidationDelegate);
|
| };
|
|
|
| + // Called when |credit_card_to_edit_| was successfully edited.
|
| + base::OnceClosure on_edited_;
|
| + // Called when a new card was added. The const reference is short-lived, and
|
| + // the callee should make a copy.
|
| + base::OnceCallback<void(const autofill::CreditCard&)> on_added_;
|
| +
|
| // If non-nullptr, a pointer to an object to be edited. Must outlive this
|
| // controller.
|
| autofill::CreditCard* credit_card_to_edit_;
|
|
|