Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1213)

Unified Diff: chrome/browser/ui/views/payments/payment_request_dialog_view.h

Issue 2807363003: [Payments] After adding/editing a credit card, instrument is selected. (Closed)
Patch Set: include fix Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/payments/payment_request_dialog_view.h
diff --git a/chrome/browser/ui/views/payments/payment_request_dialog_view.h b/chrome/browser/ui/views/payments/payment_request_dialog_view.h
index b79c877ad70055ec11a128cafb8214193119b1ba..cfdf55a847e561c90431799959eb2e9366633e1e 100644
--- a/chrome/browser/ui/views/payments/payment_request_dialog_view.h
+++ b/chrome/browser/ui/views/payments/payment_request_dialog_view.h
@@ -8,6 +8,7 @@
#include <map>
#include <memory>
+#include "base/callback_forward.h"
#include "base/macros.h"
#include "chrome/browser/ui/views/payments/view_stack.h"
#include "components/payments/content/payment_request_dialog.h"
@@ -99,7 +100,13 @@ class PaymentRequestDialogView : public views::DialogDelegateView,
void ShowPaymentMethodSheet();
void ShowShippingOptionSheet();
// |credit_card| is the card to be edited, or nullptr for adding a card.
- void ShowCreditCardEditor(autofill::CreditCard* credit_card = nullptr);
+ // |on_edited| is called when |credit_card| was successfully edited, and
+ // |on_added| is called when a new credit card was added (the reference is
+ // short-lived; callee should make a copy of the CreditCard object).
+ void ShowCreditCardEditor(
+ base::OnceClosure on_edited,
+ base::OnceCallback<void(const autofill::CreditCard&)> on_added,
+ autofill::CreditCard* credit_card = nullptr);
// |profile| is the address to be edited, or nullptr for adding an address.
void ShowShippingAddressEditor(autofill::AutofillProfile* profile = nullptr);
void EditorViewUpdated();

Powered by Google App Engine
This is Rietveld 408576698