OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef IOS_CLEAN_CHROME_BROWSER_UI_DIALOGS_DIALOG_TEXT_FIELD_ITEM_H_ | |
6 #define IOS_CLEAN_CHROME_BROWSER_UI_DIALOGS_DIALOG_TEXT_FIELD_ITEM_H_ | |
7 | |
8 #import <Foundation/Foundation.h> | |
9 | |
10 // An object encapsulating the data necessary to set up a dialog's text field. | |
11 @interface DialogTextFieldItem : NSObject | |
marq (ping after 24h)
2017/06/14 10:52:15
Consider changing "Item" to "Configuration", just
kkhorimoto
2017/06/23 06:24:18
Done.
| |
12 | |
13 // Factory method for item creation. | |
14 + (instancetype)itemWithDefaultText:(NSString*)defaultText | |
15 placeholderText:(NSString*)placeholderText | |
16 secure:(BOOL)secure; | |
17 | |
18 // DialogTextFieldItems should be created through the factory method. | |
19 - (instancetype)init NS_UNAVAILABLE; | |
20 | |
21 // The default text to display in the text field, if any. | |
22 @property(nonatomic, readonly, strong) NSString* defaultText; | |
marq (ping after 24h)
2017/06/14 10:52:15
Technically these should also be 'copy' (same for
kkhorimoto
2017/06/23 06:24:18
Done.
| |
23 | |
24 // The placehodler text to display in the text field, if any. | |
25 @property(nonatomic, readonly, strong) NSString* placeholderText; | |
26 | |
27 // Whether the text field should be secure (f.e. for password). | |
marq (ping after 24h)
2017/06/14 10:52:15
nit: expand 'f.e.,', or use the more pretentious a
kkhorimoto
2017/06/23 06:24:18
Went with the pretentious option :P
| |
28 @property(nonatomic, readonly, getter=isSecure) BOOL secure; | |
29 | |
30 @end | |
31 | |
32 #endif // IOS_CLEAN_CHROME_BROWSER_UI_DIALOGS_DIALOG_TEXT_FIELD_ITEM_H_ | |
OLD | NEW |