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 #import "ios/chrome/browser/ui/payments/payment_request_editor_field.h" | 5 #import "ios/chrome/browser/ui/payments/payment_request_editor_field.h" |
6 | 6 |
7 #if !defined(__has_feature) || !__has_feature(objc_arc) | 7 #if !defined(__has_feature) || !__has_feature(objc_arc) |
8 #error "This file requires ARC support." | 8 #error "This file requires ARC support." |
9 #endif | 9 #endif |
10 | 10 |
11 @implementation EditorField | 11 @implementation EditorField |
12 | 12 |
13 @synthesize autofillUIType = _autofillUIType; | 13 @synthesize autofillUIType = _autofillUIType; |
14 @synthesize fieldType = _fieldType; | 14 @synthesize fieldType = _fieldType; |
15 @synthesize label = _label; | 15 @synthesize label = _label; |
16 @synthesize value = _value; | 16 @synthesize value = _value; |
17 @synthesize displayValue = _displayValue; | 17 @synthesize displayValue = _displayValue; |
18 @synthesize required = _required; | 18 @synthesize required = _required; |
| 19 @synthesize enabled = _enabled; |
19 @synthesize item = _item; | 20 @synthesize item = _item; |
20 @synthesize sectionIdentifier = _sectionIdentifier; | 21 @synthesize sectionIdentifier = _sectionIdentifier; |
21 | 22 |
22 - (instancetype)initWithAutofillUIType:(AutofillUIType)autofillUIType | 23 - (instancetype)initWithAutofillUIType:(AutofillUIType)autofillUIType |
23 fieldType:(EditorFieldType)fieldType | 24 fieldType:(EditorFieldType)fieldType |
24 label:(NSString*)label | 25 label:(NSString*)label |
25 value:(NSString*)value | 26 value:(NSString*)value |
26 required:(BOOL)required { | 27 required:(BOOL)required { |
27 self = [super init]; | 28 self = [super init]; |
28 if (self) { | 29 if (self) { |
29 _autofillUIType = autofillUIType; | 30 _autofillUIType = autofillUIType; |
30 _fieldType = fieldType; | 31 _fieldType = fieldType; |
31 _label = label; | 32 _label = label; |
32 _value = value; | 33 _value = value; |
33 _required = required; | 34 _required = required; |
| 35 _enabled = YES; |
34 } | 36 } |
35 return self; | 37 return self; |
36 } | 38 } |
37 | 39 |
38 - (NSString*)description { | 40 - (NSString*)description { |
39 return [NSString stringWithFormat:@"Label: %@, Value: %@", _label, _value]; | 41 return [NSString stringWithFormat:@"Label: %@, Value: %@", _label, _value]; |
40 } | 42 } |
41 | 43 |
42 @end | 44 @end |
OLD | NEW |