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

Unified Diff: ios/chrome/browser/payments/payment_request_editor_field.h

Issue 2744823003: [Payment Request] Generic edit form (Closed)
Patch Set: rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/payments/payment_request_editor_field.h
diff --git a/ios/chrome/browser/payments/payment_request_editor_field.h b/ios/chrome/browser/payments/payment_request_editor_field.h
new file mode 100644
index 0000000000000000000000000000000000000000..581de45184083e26fbcbd05a85cfdfec069fbae1
--- /dev/null
+++ b/ios/chrome/browser/payments/payment_request_editor_field.h
@@ -0,0 +1,36 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_
+#define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_
+
+#import <Foundation/Foundation.h>
+
+@class AutofillEditItem;
+
+// Field definition for an editor field. Used for building the UI and
+// validation.
+@interface EditorField : NSObject
+
+// Autofill type for the field. Corresponds to autofill::ServerFieldType
+@property(nonatomic, assign) NSInteger autofillType;
+// Label for the field.
+@property(nonatomic, copy) NSString* label;
+// Value of the field. May be nil.
+@property(nonatomic, copy) NSString* value;
+// Whether the field is required.
+@property(nonatomic, getter=isRequired) BOOL required;
+// The associated AutofillEditItem instance. May be nil.
+@property(nonatomic, assign) AutofillEditItem* item;
+// The section identifier for the associated AutofillEditItem.
+@property(nonatomic, assign) NSInteger sectionIdentifier;
+
+- (instancetype)initWithAutofillType:(NSInteger)autofillType
+ label:(NSString*)label
+ value:(NSString*)value
+ required:(BOOL)required;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_EDITOR_FIELD_H_

Powered by Google App Engine
This is Rietveld 408576698