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

Unified Diff: ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h

Issue 2167683002: Creates coordinator for ActionSheet and TextInput (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@alertCoordinator
Patch Set: Keep message property Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h
diff --git a/ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h b/ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h
index e03efbab9efed12357bb5977e0d3d356dadb9d34..ea75b9516cd2624f927db4ccb1cfa2931c0d1d85 100644
--- a/ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h
+++ b/ios/chrome/browser/ui/alert_coordinator/alert_coordinator.h
@@ -10,11 +10,10 @@
#include "base/ios/block_types.h"
#import "ios/chrome/browser/chrome_coordinator.h"
-// A coordinator specialization for the case where the coordinator is
-// creating and managing an alert (popup or action sheet) to be displayed to the
-// user. Dismiss it with no animation.
-// The type of alert displayed depends on the init called.
-// Calling |-stop| on this coordinator destroys the current alert.
+// A coordinator specialization for the case where the coordinator is creating
+// and managing a modal alert to be displayed to the user.
+// Calling |-stop| on this coordinator dismisses the current alert with no
+// animation then destroys it.
@interface AlertCoordinator : ChromeCoordinator
// Whether a cancel button has been added.
@@ -28,16 +27,12 @@
- (instancetype)initWithBaseViewController:(UIViewController*)viewController
NS_UNAVAILABLE;
-// Init a coordinator for displaying a alert on this view controller. If
-// |-configureForActionSheetWithRect:popoverView:| is not called, it will be a
-// modal alert.
+// Init a coordinator for displaying a alert on this view controller.
- (instancetype)initWithBaseViewController:(UIViewController*)viewController
title:(NSString*)title
+ message:(NSString*)message
NS_DESIGNATED_INITIALIZER;
-// Call this before adding any button to change the alert to an action sheet.
-- (void)configureForActionSheetWithRect:(CGRect)rect popoverView:(UIView*)view;
-
// Adds an item at the end of the menu. It does nothing if |visible| is true or
// if trying to add an item with a UIAlertActionStyleCancel while
// |cancelButtonAdded| is true.
@@ -45,9 +40,11 @@
action:(ProceduralBlock)actionBlock
style:(UIAlertActionStyle)style;
-// Returns the number of actions attached to the current alert.
-- (NSUInteger)actionsCount;
+@end
+@interface AlertCoordinator (subclassing)
lpromero 2016/07/21 21:47:50 s/subclassing/Subclassing
gambard 2016/07/22 13:51:19 Done.
+// Lazy initializer to create the alertController.
+@property(nonatomic, readonly) UIAlertController* alertController;
@end
#endif // IOS_CHROME_BROWSER_UI_ALERT_COORDINATOR_ALERT_COORDINATOR_H_

Powered by Google App Engine
This is Rietveld 408576698