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

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

Issue 2876603005: [Payment Request] Refactors the edit view controller (Closed)
Patch Set: Addressed comments Created 3 years, 7 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 label = _label; 15 @synthesize label = _label;
15 @synthesize value = _value; 16 @synthesize value = _value;
17 @synthesize displayValue = _displayValue;
16 @synthesize required = _required; 18 @synthesize required = _required;
17 @synthesize item = _item; 19 @synthesize item = _item;
18 @synthesize sectionIdentifier = _sectionIdentifier; 20 @synthesize sectionIdentifier = _sectionIdentifier;
19 21
20 - (instancetype)initWithAutofillUIType:(AutofillUIType)autofillUIType 22 - (instancetype)initWithAutofillUIType:(AutofillUIType)autofillUIType
23 fieldType:(EditorFieldType)fieldType
21 label:(NSString*)label 24 label:(NSString*)label
22 value:(NSString*)value 25 value:(NSString*)value
23 required:(BOOL)required { 26 required:(BOOL)required {
24 self = [super init]; 27 self = [super init];
25 if (self) { 28 if (self) {
26 _autofillUIType = autofillUIType; 29 _autofillUIType = autofillUIType;
30 _fieldType = fieldType;
27 _label = label; 31 _label = label;
28 _value = value; 32 _value = value;
29 _required = required; 33 _required = required;
30 } 34 }
31 return self; 35 return self;
32 } 36 }
33 37
38 - (NSString*)description {
39 return [NSString stringWithFormat:@"Label: %@, Value: %@", _label, _value];
40 }
41
34 @end 42 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/payments/payment_request_editor_field.h ('k') | ios/showcase/payments/sc_payments_editor_coordinator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698