| 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 <UIKit/UIKit.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 EditorFieldTypeSwitch, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 30 @property(nonatomic, copy) NSString* label; | 30 @property(nonatomic, copy) NSString* label; |
| 31 // Value of the field. May be nil. | 31 // Value of the field. May be nil. |
| 32 @property(nonatomic, copy) NSString* value; | 32 @property(nonatomic, copy) NSString* value; |
| 33 // Optional display value. Used in selector editor fields where |value| is not | 33 // Optional display value. Used in selector editor fields where |value| is not |
| 34 // meant for display purposes. | 34 // meant for display purposes. |
| 35 @property(nonatomic, copy) NSString* displayValue; | 35 @property(nonatomic, copy) NSString* displayValue; |
| 36 // Whether the field is required. | 36 // Whether the field is required. |
| 37 @property(nonatomic, getter=isRequired) BOOL required; | 37 @property(nonatomic, getter=isRequired) BOOL required; |
| 38 // Whether the field is enabled. | 38 // Whether the field is enabled. |
| 39 @property(nonatomic, getter=isEnabled) BOOL enabled; | 39 @property(nonatomic, getter=isEnabled) BOOL enabled; |
| 40 // Controls the display of the return key when the keyboard is displaying. |
| 41 @property(nonatomic, assign) UIReturnKeyType returnKeyType; |
| 42 // Keyboard type to be displayed when the text field becomes first responder. |
| 43 @property(nonatomic, assign) UIKeyboardType keyboardType; |
| 44 // Controls autocapitalization behavior of the text field. |
| 45 @property(nonatomic, assign) |
| 46 UITextAutocapitalizationType autoCapitalizationType; |
| 40 // The associated CollectionViewItem instance. May be nil. | 47 // The associated CollectionViewItem instance. May be nil. |
| 41 @property(nonatomic, strong) CollectionViewItem* item; | 48 @property(nonatomic, strong) CollectionViewItem* item; |
| 42 // The section identifier for the associated AutofillEditItem. | 49 // The section identifier for the associated AutofillEditItem. |
| 43 @property(nonatomic, assign) NSInteger sectionIdentifier; | 50 @property(nonatomic, assign) NSInteger sectionIdentifier; |
| 44 | 51 |
| 45 - (instancetype)initWithAutofillUIType:(AutofillUIType)autofillUIType | 52 - (instancetype)initWithAutofillUIType:(AutofillUIType)autofillUIType |
| 46 fieldType:(EditorFieldType)fieldType | 53 fieldType:(EditorFieldType)fieldType |
| 47 label:(NSString*)label | 54 label:(NSString*)label |
| 48 value:(NSString*)value | 55 value:(NSString*)value |
| 49 required:(BOOL)required; | 56 required:(BOOL)required; |
| 50 | 57 |
| 51 @end | 58 @end |
| 52 | 59 |
| 53 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_ | 60 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_ |
| OLD | NEW |