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

Side by Side Diff: ios/chrome/browser/ui/payments/payment_request_editor_field.mm

Issue 2956433002: [Payment Request] keyboardType, autoCapitalizationType, etc for text fields (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
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 enabled = _enabled;
20 @synthesize returnKeyType = _returnKeyType;
21 @synthesize keyboardType = _keyboardType;
22 @synthesize autoCapitalizationType = _autoCapitalizationType;
20 @synthesize item = _item; 23 @synthesize item = _item;
21 @synthesize sectionIdentifier = _sectionIdentifier; 24 @synthesize sectionIdentifier = _sectionIdentifier;
22 25
23 - (instancetype)initWithAutofillUIType:(AutofillUIType)autofillUIType 26 - (instancetype)initWithAutofillUIType:(AutofillUIType)autofillUIType
24 fieldType:(EditorFieldType)fieldType 27 fieldType:(EditorFieldType)fieldType
25 label:(NSString*)label 28 label:(NSString*)label
26 value:(NSString*)value 29 value:(NSString*)value
27 required:(BOOL)required { 30 required:(BOOL)required {
28 self = [super init]; 31 self = [super init];
29 if (self) { 32 if (self) {
30 _autofillUIType = autofillUIType; 33 _autofillUIType = autofillUIType;
31 _fieldType = fieldType; 34 _fieldType = fieldType;
32 _label = label; 35 _label = label;
33 _value = value; 36 _value = value;
34 _required = required; 37 _required = required;
35 _enabled = YES; 38 _enabled = YES;
39 _returnKeyType = UIReturnKeyNext;
40 _keyboardType = UIKeyboardTypeDefault;
41 _autoCapitalizationType = UITextAutocapitalizationTypeWords;
36 } 42 }
37 return self; 43 return self;
38 } 44 }
39 45
40 - (NSString*)description { 46 - (NSString*)description {
41 return [NSString stringWithFormat:@"Label: %@, Value: %@", _label, _value]; 47 return [NSString stringWithFormat:@"Label: %@, Value: %@", _label, _value];
42 } 48 }
43 49
44 @end 50 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698