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

Side by Side Diff: ios/clean/chrome/browser/ui/dialogs/dialog_button_configuration.h

Issue 2929563002: [iOS Clean] Added dialogs UI support.
Patch Set: rebase & Mark's comments Created 3 years, 6 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 unified diff | Download patch
OLDNEW
(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_BUTTON_CONFIGURATION_H_
6 #define IOS_CLEAN_CHROME_BROWSER_UI_DIALOGS_DIALOG_BUTTON_CONFIGURATION_H_
7
8 #import <UIKit/UIKit.h>
9
10 // Enum type to describe the style of buttons to use.
11 enum class DialogButtonStyle : short {
12 DEFAULT = 0, // Uses default button styling.
13
14 CANCEL, // Uses styling to indicates that the button cancels the
15 // current action, and leaves things unchanged.
16
17 DESTRUCTIVE // Uses styling that indicates that the button might change or
18 // delete data.
19 };
20
21 // An object encapsulating the data necessary to set up a dialog button.
22 @interface DialogButtonConfiguration : NSObject
23
24 // Factory method for item creation. |text| must be non-empty, and |identifier|
25 // must be non-nil.
26 + (instancetype)itemWithText:(NSString*)text
27 style:(DialogButtonStyle)style
28 identifier:(id)identifier;
29
30 // DialogTextFieldConfigurations should be created through the factory method.
31 - (instancetype)init NS_UNAVAILABLE;
32
33 // The default text to display in the text field, if any.
34 @property(nonatomic, readonly, copy) NSString* text;
35
36 // The placehodler text to display in the text field, if any.
37 @property(nonatomic, readonly) DialogButtonStyle style;
38
39 // The ID passed to the factory method. This is used to identify the button
40 // tapped for DialogDismissalCommands.
41 @property(nonatomic, readonly, strong) id identifier;
42
43 @end
44 #endif // IOS_CLEAN_CHROME_BROWSER_UI_DIALOGS_DIALOG_BUTTON_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « ios/clean/chrome/browser/ui/dialogs/BUILD.gn ('k') | ios/clean/chrome/browser/ui/dialogs/dialog_button_configuration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698