| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_ |
| 6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 |
| 10 @class AutofillEditItem; |
| 11 |
| 12 // Field definition for an editor field. Used for building the UI and |
| 13 // validation. |
| 14 @interface EditorField : NSObject |
| 15 |
| 16 // Autofill type for the field. Corresponds to autofill::ServerFieldType |
| 17 @property(nonatomic, assign) NSInteger autofillType; |
| 18 // Label for the field. |
| 19 @property(nonatomic, copy) NSString* label; |
| 20 // Value of the field. May be nil. |
| 21 @property(nonatomic, copy) NSString* value; |
| 22 // Whether the field is required. |
| 23 @property(nonatomic, getter=isRequired) BOOL required; |
| 24 // The associated AutofillEditItem instance. May be nil. |
| 25 @property(nonatomic, assign) AutofillEditItem* item; |
| 26 // The section identifier for the associated AutofillEditItem. |
| 27 @property(nonatomic, assign) NSInteger sectionIdentifier; |
| 28 |
| 29 - (instancetype)initWithAutofillType:(NSInteger)autofillType |
| 30 label:(NSString*)label |
| 31 value:(NSString*)value |
| 32 required:(BOOL)required; |
| 33 |
| 34 @end |
| 35 |
| 36 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_ |
| OLD | NEW |