Commit 3a81544a authored by Nazerke's avatar Nazerke Committed by Commit Bot

[iOS][coordinator] Modernize Identity Chooser Coordinator.

This CL modernizes the IdentityChooserCoordinator to use |browser| in
the initializer.

Bug: 1029346, 1048410

Change-Id: I6b5440e2124c9d62060bc6eba70446c7fcb1ae5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078476Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Nazerke Kalidolda <nazerke@google.com>
Cr-Commit-Position: refs/heads/master@{#745438}
parent 9c7a4b6c
...@@ -15,6 +15,14 @@ ...@@ -15,6 +15,14 @@
// Coordinator to display the identity chooser view controller. // Coordinator to display the identity chooser view controller.
@interface IdentityChooserCoordinator : ChromeCoordinator @interface IdentityChooserCoordinator : ChromeCoordinator
// Unavailable, use -initWithBaseViewController:browser:.
- (instancetype)initWithBaseViewController:(UIViewController*)viewController
NS_UNAVAILABLE;
// Unavailable, use -initWithBaseViewController:browser:.
- (instancetype)initWithBaseViewController:(UIViewController*)viewController
browserState:(ChromeBrowserState*)browserState
NS_UNAVAILABLE;
// Selected ChromeIdentity. // Selected ChromeIdentity.
@property(nonatomic, strong) ChromeIdentity* selectedIdentity; @property(nonatomic, strong) ChromeIdentity* selectedIdentity;
// Delegate. // Delegate.
......
...@@ -91,7 +91,8 @@ ...@@ -91,7 +91,8 @@
// Opens the identity chooser dialog with an animation from |point|. // Opens the identity chooser dialog with an animation from |point|.
- (void)showIdentityChooserDialogWithPoint:(CGPoint)point { - (void)showIdentityChooserDialogWithPoint:(CGPoint)point {
self.identityChooserCoordinator = [[IdentityChooserCoordinator alloc] self.identityChooserCoordinator = [[IdentityChooserCoordinator alloc]
initWithBaseViewController:self.unifiedConsentViewController]; initWithBaseViewController:self.unifiedConsentViewController
browser:self.browser];
self.identityChooserCoordinator.delegate = self; self.identityChooserCoordinator.delegate = self;
self.identityChooserCoordinator.origin = point; self.identityChooserCoordinator.origin = point;
[self.identityChooserCoordinator start]; [self.identityChooserCoordinator start];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment