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

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

Issue 2805263003: [Payments] Selecting incomplete items will open editors (Closed)
Patch Set: fix ios test for realz 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/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 61d2ee7fce73c81c7baf4e5d0c124a5b9763509b..271b46f44749e286617778dc1ba62c42ca86b1f8 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
@@ -13,6 +13,10 @@
#include "chrome/browser/ui/views/payments/editor_view_controller.h"
#include "chrome/browser/ui/views/payments/validating_textfield.h"
+namespace autofill {
+class AutofillProfile;
+} // namespace autofill
+
namespace payments {
class PaymentRequestSpec;
@@ -25,12 +29,15 @@ class ShippingAddressEditorViewController : public EditorViewController {
// Does not take ownership of the arguments, which should outlive this object.
ShippingAddressEditorViewController(PaymentRequestSpec* spec,
PaymentRequestState* state,
- PaymentRequestDialogView* dialog);
+ PaymentRequestDialogView* dialog,
+ autofill::AutofillProfile* profile);
~ShippingAddressEditorViewController() override;
// EditorViewController:
std::unique_ptr<views::View> CreateHeaderView() override;
std::vector<EditorField> GetFieldDefinitions() override;
+ base::string16 GetInitialValueForType(
+ autofill::ServerFieldType type) override;
bool ValidateModelAndSave() override;
std::unique_ptr<ValidationDelegate> CreateValidationDelegate(
const EditorField& field) override;
@@ -65,6 +72,10 @@ class ShippingAddressEditorViewController : public EditorViewController {
};
friend class ShippingAddressValidationDelegate;
+ // If non-nullptr, a point to an object to be edited, which should outlive
+ // this controller.
+ autofill::AutofillProfile* profile_to_edit_;
+
// List of fields, reset everytime the current country changes.
std::vector<EditorField> editor_fields_;

Powered by Google App Engine
This is Rietveld 408576698