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_CONFIGURATION_H_ |
| 6 #define IOS_CLEAN_CHROME_BROWSER_UI_DIALOGS_DIALOG_TEXT_FIELD_CONFIGURATION_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 DialogTextFieldConfiguration : NSObject |
| 12 |
| 13 // Factory method for item creation. |
| 14 + (instancetype)itemWithDefaultText:(NSString*)defaultText |
| 15 placeholderText:(NSString*)placeholderText |
| 16 secure:(BOOL)secure |
| 17 identifier:(id)identifier; |
| 18 |
| 19 // DialogTextFieldConfigurations should be created through the factory method. |
| 20 - (instancetype)init NS_UNAVAILABLE; |
| 21 |
| 22 // The default text to display in the text field, if any. |
| 23 @property(nonatomic, readonly, copy) NSString* defaultText; |
| 24 |
| 25 // The placehodler text to display in the text field, if any. |
| 26 @property(nonatomic, readonly, copy) NSString* placeholderText; |
| 27 |
| 28 // Whether the text field should be secure (e.g. for password). |
| 29 @property(nonatomic, readonly, getter=isSecure) BOOL secure; |
| 30 |
| 31 // The ID passed to the factory method. This can be used to identify the text |
| 32 // fields for DialogDismissalCommands. |
| 33 @property(nonatomic, readonly, strong) id identifier; |
| 34 |
| 35 @end |
| 36 |
| 37 #endif // IOS_CLEAN_CHROME_BROWSER_UI_DIALOGS_DIALOG_TEXT_FIELD_CONFIGURATION_H
_ |
OLD | NEW |