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

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

Issue 2849523003: Add billing address as a mandatory field of Payments credit cards. (Closed)
Patch Set: Components Unittests fix Created 3 years, 7 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/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 ccc555f1069297254ab3f10f930535d5ac1f8edc..6256799981d33ae465f31056bcf834446790f72b 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
@@ -17,6 +17,7 @@
#include "ui/base/models/simple_combobox_model.h"
namespace autofill {
+class AutofillProfile;
class CreditCard;
} // namespace autofill
@@ -38,6 +39,8 @@ class CreditCardEditorViewController : public EditorViewController {
PaymentRequestSpec* spec,
PaymentRequestState* state,
PaymentRequestDialogView* dialog,
+ BackNavigationType back_navigation,
+ int next_ui_tag,
base::OnceClosure on_edited,
base::OnceCallback<void(const autofill::CreditCard&)> on_added,
autofill::CreditCard* credit_card);
@@ -45,6 +48,7 @@ class CreditCardEditorViewController : public EditorViewController {
// EditorViewController:
std::unique_ptr<views::View> CreateHeaderView() override;
+ std::unique_ptr<views::View> CreateCustomFieldsView() override;
std::vector<EditorField> GetFieldDefinitions() override;
base::string16 GetInitialValueForType(
autofill::ServerFieldType type) override;
@@ -57,6 +61,7 @@ class CreditCardEditorViewController : public EditorViewController {
protected:
// PaymentRequestSheetController:
base::string16 GetSheetTitle() override;
+ void ButtonPressed(views::Button* sender, const ui::Event& event) override;
private:
class CreditCardValidationDelegate : public ValidationDelegate {
@@ -88,6 +93,9 @@ class CreditCardEditorViewController : public EditorViewController {
DISALLOW_COPY_AND_ASSIGN(CreditCardValidationDelegate);
};
+ // Called when a new address was created to be used as the billing address.
Mathieu 2017/05/04 20:29:19 mention the lifetime of |profile|?
MAD 2017/05/05 00:50:07 Why? It's a const ref that shouldn't be kept beyon
Mathieu 2017/05/05 13:51:33 I haven't double-checked but I think |profile| is
MAD 2017/05/05 18:32:34 Yes, the lifespan of the passed in profile is unkn
+ void AddAndSelectNewBillingAddress(const autofill::AutofillProfile& profile);
+
// 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
@@ -98,6 +106,9 @@ class CreditCardEditorViewController : public EditorViewController {
// controller.
autofill::CreditCard* credit_card_to_edit_;
+ // The value to use for the add billing address button tag.
+ int add_billing_address_button_tag_;
+
DISALLOW_COPY_AND_ASSIGN(CreditCardEditorViewController);
};

Powered by Google App Engine
This is Rietveld 408576698