Chromium Code Reviews| Index: ios/clean/chrome/browser/ui/dialogs/dialog_text_field_item.h |
| diff --git a/ios/clean/chrome/browser/ui/dialogs/dialog_text_field_item.h b/ios/clean/chrome/browser/ui/dialogs/dialog_text_field_item.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..227f405ddf784656a3b722df19baec3ed1dad922 |
| --- /dev/null |
| +++ b/ios/clean/chrome/browser/ui/dialogs/dialog_text_field_item.h |
| @@ -0,0 +1,32 @@ |
| +// 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_CLEAN_CHROME_BROWSER_UI_DIALOGS_DIALOG_TEXT_FIELD_ITEM_H_ |
| +#define IOS_CLEAN_CHROME_BROWSER_UI_DIALOGS_DIALOG_TEXT_FIELD_ITEM_H_ |
| + |
| +#import <Foundation/Foundation.h> |
| + |
| +// An object encapsulating the data necessary to set up a dialog's text field. |
| +@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.
|
| + |
| +// Factory method for item creation. |
| ++ (instancetype)itemWithDefaultText:(NSString*)defaultText |
| + placeholderText:(NSString*)placeholderText |
| + secure:(BOOL)secure; |
| + |
| +// DialogTextFieldItems should be created through the factory method. |
| +- (instancetype)init NS_UNAVAILABLE; |
| + |
| +// The default text to display in the text field, if any. |
| +@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.
|
| + |
| +// The placehodler text to display in the text field, if any. |
| +@property(nonatomic, readonly, strong) NSString* placeholderText; |
| + |
| +// 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
|
| +@property(nonatomic, readonly, getter=isSecure) BOOL secure; |
| + |
| +@end |
| + |
| +#endif // IOS_CLEAN_CHROME_BROWSER_UI_DIALOGS_DIALOG_TEXT_FIELD_ITEM_H_ |