| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_ | 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h" | 10 #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h" |
| 11 | 11 |
| 12 @class CollectionViewItem; | 12 @class CollectionViewItem; |
| 13 | 13 |
| 14 // Type of the editor field. i.e., text field or selector field. | 14 // Type of the editor field. i.e., text field or selector field. |
| 15 typedef NS_ENUM(NSInteger, EditorFieldType) { | 15 typedef NS_ENUM(NSInteger, EditorFieldType) { |
| 16 EditorFieldTypeTextField, | 16 EditorFieldTypeTextField, |
| 17 EditorFieldTypeSelector, | 17 EditorFieldTypeSelector, |
| 18 EditorFieldTypeSwitch, |
| 18 }; | 19 }; |
| 19 | 20 |
| 20 // Field definition for an editor field. Used for building the UI and | 21 // Field definition for an editor field. Used for building the UI and |
| 21 // validation. | 22 // validation. |
| 22 @interface EditorField : NSObject | 23 @interface EditorField : NSObject |
| 23 | 24 |
| 24 // Autofill type for the field. | 25 // Autofill type for the field. |
| 25 @property(nonatomic, assign) AutofillUIType autofillUIType; | 26 @property(nonatomic, assign) AutofillUIType autofillUIType; |
| 26 // Type of the field. | 27 // Type of the field. |
| 27 @property(nonatomic, assign) EditorFieldType fieldType; | 28 @property(nonatomic, assign) EditorFieldType fieldType; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 43 | 44 |
| 44 - (instancetype)initWithAutofillUIType:(AutofillUIType)autofillUIType | 45 - (instancetype)initWithAutofillUIType:(AutofillUIType)autofillUIType |
| 45 fieldType:(EditorFieldType)fieldType | 46 fieldType:(EditorFieldType)fieldType |
| 46 label:(NSString*)label | 47 label:(NSString*)label |
| 47 value:(NSString*)value | 48 value:(NSString*)value |
| 48 required:(BOOL)required; | 49 required:(BOOL)required; |
| 49 | 50 |
| 50 @end | 51 @end |
| 51 | 52 |
| 52 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_ | 53 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_ |
| OLD | NEW |