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

Side by Side Diff: ios/chrome/browser/ui/autofill/cells/cvc_item.h

Issue 2586993002: Upstream Chrome on iOS source code [3/11]. (Closed)
Patch Set: Created 4 years 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_AUTOFILL_CELLS_CVC_ITEM_H_
6 #define IOS_CHROME_BROWSER_UI_AUTOFILL_CELLS_CVC_ITEM_H_
7
8 #import <UIKit/UIKit.h>
9
10 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
11 #import "ios/third_party/material_components_ios/src/components/CollectionCells/ src/MaterialCollectionCells.h"
12
13 @protocol TextFieldStyling;
14
15 // Item corresponding to a CVCCell.
16 @interface CVCItem : CollectionViewItem
17
18 // The instructions text to display.
19 @property(nonatomic, copy) NSString* instructionsText;
20
21 // The optioonal error message to display.
22 @property(nonatomic, copy) NSString* errorMessage;
23
24 // The month text appearing in the |monthInput| of the cell, if |showDateInput|
25 // is true.
26 @property(nonatomic, copy) NSString* monthText;
27
28 // The year text appearing in the |yearInput| of the cell, if |showDateInput|
29 // is true.
30 @property(nonatomic, copy) NSString* yearText;
31
32 // The CVC text appearing in the |CVCInput| of the cell.
33 @property(nonatomic, copy) NSString* CVCText;
34
35 // Whether the cell should show the date inputs.
36 @property(nonatomic, assign) BOOL showDateInput;
37
38 // Whether the cell should show the "New Card?" button.
39 @property(nonatomic, assign) BOOL showNewCardButton;
40
41 // Whether the date inputs contain erroneous data.
42 @property(nonatomic, assign) BOOL showDateInputError;
43
44 // Whether the CVC input contains erroneous data.
45 @property(nonatomic, assign) BOOL showCVCInputError;
46
47 // The resource ID of the CVC image to use.
48 @property(nonatomic, assign) int CVCImageResourceID;
49
50 @end
51
52 // The CVC cell includes a label with instructions, optional text fields that
53 // allow the user to enter a new expiration date, a text field where the user
54 // enters the CVC, and an image showing where the CVC appears on the card (which
55 // varies by card type). If there is an error message but a new expiration date
56 // is not requested, a "New card?" link will be shown that allows the user to
57 // show the date input fields. Below the inputs, the error messsage will be
58 // shown if supplied.
59 @interface CVCCell : MDCCollectionViewCell
60
61 // The label displaying instructions.
62 @property(nonatomic, readonly, strong) UILabel* instructionsTextLabel;
63
64 // The label displaying the optional error.
65 @property(nonatomic, readonly, strong) UILabel* errorLabel;
66
67 // The text field for entering the month.
68 @property(nonatomic, readonly, strong)
69 UITextField<TextFieldStyling>* monthInput;
70
71 // The text field for entering the year.
72 @property(nonatomic, readonly, strong) UITextField<TextFieldStyling>* yearInput;
73
74 // The text field for entering the CVC.
75 @property(nonatomic, readonly, strong) UITextField<TextFieldStyling>* CVCInput;
76
77 // The image view to display the CVC image with the |CVCResourceID|.
78 @property(nonatomic, readonly, strong) UIImageView* CVCImageView;
79
80 // The "New Card?" button.
81 @property(nonatomic, readonly, strong) UIButton* buttonForNewCard;
82
83 @end
84
85 #endif // IOS_CHROME_BROWSER_UI_AUTOFILL_CELLS_CVC_ITEM_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/autofill/card_unmask_prompt_view_bridge.mm ('k') | ios/chrome/browser/ui/autofill/cells/cvc_item.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698