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 96b6be01721cd76e995f267754b6933306c2e3c9..f7cfde1b1782e860db3b6f6f3fa8882bd42218d9 100644 |
--- a/chrome/browser/ui/views/payments/payment_request_dialog_view.h |
+++ b/chrome/browser/ui/views/payments/payment_request_dialog_view.h |
@@ -32,6 +32,11 @@ class PaymentRequestSheetController; |
using ControllerMap = |
std::map<views::View*, std::unique_ptr<PaymentRequestSheetController>>; |
+enum class BackNavigationType { |
+ kOneStep = 0, |
+ kPaymentSheet, |
+}; |
+ |
// The dialog delegate that represents a desktop WebPayments dialog. This class |
// is responsible for displaying the view associated with the current state of |
// the WebPayments flow and managing the transition between those states. |
@@ -108,7 +113,11 @@ class PaymentRequestDialogView : public views::DialogDelegateView, |
// |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). |
+ // |back_navigation_type| identifies the type of navigation to execute once |
+ // the editor has completed successfully. |
void ShowCreditCardEditor( |
+ BackNavigationType back_navigation_type, |
+ int next_ui_tag, |
Mathieu
2017/05/04 20:29:19
can you document this one
MAD
2017/05/05 00:50:07
Done.
|
base::OnceClosure on_edited, |
base::OnceCallback<void(const autofill::CreditCard&)> on_added, |
autofill::CreditCard* credit_card = nullptr); |
@@ -116,12 +125,18 @@ class PaymentRequestDialogView : public views::DialogDelegateView, |
// |on_edited| is called when |profile| was successfully edited, and |
// |on_added| is called when a new profile was added (the reference is |
// short-lived; callee should make a copy of the profile object). |
+ // |back_navigation_type| identifies the type of navigation to execute once |
+ // the editor has completed successfully. |
void ShowShippingAddressEditor( |
+ BackNavigationType back_navigation_type, |
base::OnceClosure on_edited, |
base::OnceCallback<void(const autofill::AutofillProfile&)> on_added, |
autofill::AutofillProfile* profile); |
// |profile| is the profile to be edited, or nullptr for adding a profile. |
- void ShowContactInfoEditor(autofill::AutofillProfile* profile = nullptr); |
+ // |back_navigation_type| identifies the type of navigation to execute once |
+ // the editor has completed successfully. |
+ void ShowContactInfoEditor(BackNavigationType back_navigation_type, |
+ autofill::AutofillProfile* profile = nullptr); |
void EditorViewUpdated(); |
void ShowCvcUnmaskPrompt( |