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

Unified Diff: ios/chrome/browser/ui/payments/payment_request_editor_field.h

Issue 2876603005: [Payment Request] Refactors the edit view controller (Closed)
Patch Set: Addressed comments 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: ios/chrome/browser/ui/payments/payment_request_editor_field.h
diff --git a/ios/chrome/browser/ui/payments/payment_request_editor_field.h b/ios/chrome/browser/ui/payments/payment_request_editor_field.h
index cdce8a7d3877899500af8b8b9926e0872102cd6b..def8ee8541624b350e6acddd65358ece3bb46754 100644
--- a/ios/chrome/browser/ui/payments/payment_request_editor_field.h
+++ b/ios/chrome/browser/ui/payments/payment_request_editor_field.h
@@ -9,7 +9,13 @@
#import "ios/chrome/browser/ui/autofill/autofill_ui_type.h"
-@class AutofillEditItem;
+@class CollectionViewItem;
+
+// Type of the editor field. i.e., text field or selector field.
+typedef NS_ENUM(NSInteger, EditorFieldType) {
+ EditorFieldTypeTextField,
+ EditorFieldTypeSelector,
+};
// Field definition for an editor field. Used for building the UI and
// validation.
@@ -17,18 +23,24 @@
// Autofill type for the field.
@property(nonatomic, assign) AutofillUIType autofillUIType;
+// Type of the field.
+@property(nonatomic, assign) EditorFieldType fieldType;
// Label for the field.
@property(nonatomic, copy) NSString* label;
// Value of the field. May be nil.
@property(nonatomic, copy) NSString* value;
+// Optional display value. Used in selector editor fields where |value| is not
+// meant for display purposes.
+@property(nonatomic, copy) NSString* displayValue;
// Whether the field is required.
@property(nonatomic, getter=isRequired) BOOL required;
-// The associated AutofillEditItem instance. May be nil.
-@property(nonatomic, strong) AutofillEditItem* item;
+// The associated CollectionViewItem instance. May be nil.
+@property(nonatomic, strong) CollectionViewItem* item;
// The section identifier for the associated AutofillEditItem.
@property(nonatomic, assign) NSInteger sectionIdentifier;
- (instancetype)initWithAutofillUIType:(AutofillUIType)autofillUIType
+ fieldType:(EditorFieldType)fieldType
label:(NSString*)label
value:(NSString*)value
required:(BOOL)required;

Powered by Google App Engine
This is Rietveld 408576698