Commit f1a2af47 authored by Stepan Khapugin's avatar Stepan Khapugin Committed by Commit Bot

[iOS][multiball] Move signinInteractionCoordinator to SceneController.

Reparents signinInteractionCooordinator and cleans up guts interfaces.

Note the new method in SceneControllerGuts that allows MC to cleanup
a SC before shutdown. I think this is fine at least temporarily, but
we need to iron out how this happens in iOS 12 compat in the future.

Bug: none
Change-Id: Ie214b60b830548f1aaec56207298cdf6ba6ddd3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007051
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733427}
parent f0e9bead
......@@ -228,7 +228,6 @@ source_set("app_internal") {
"//ios/chrome/browser/ui/settings",
"//ios/chrome/browser/ui/settings:settings_root",
"//ios/chrome/browser/ui/settings/google_services",
"//ios/chrome/browser/ui/signin_interaction",
"//ios/chrome/browser/ui/tab_grid",
"//ios/chrome/browser/ui/tab_grid:tab_grid_ui",
"//ios/chrome/browser/ui/table_view",
......
......@@ -123,7 +123,6 @@
#import "ios/chrome/browser/ui/main/scene_controller_guts.h"
#import "ios/chrome/browser/ui/promos/signin_promo_view_controller.h"
#import "ios/chrome/browser/ui/settings/settings_navigation_controller.h"
#import "ios/chrome/browser/ui/signin_interaction/signin_interaction_coordinator.h"
#include "ios/chrome/browser/ui/tab_grid/tab_grid_coordinator.h"
#import "ios/chrome/browser/ui/tab_grid/tab_switcher.h"
#import "ios/chrome/browser/ui/tab_grid/view_controller_swapping.h"
......@@ -431,7 +430,6 @@ void MainControllerAuthenticationServiceDelegate::ClearBrowsingData(
@synthesize appURLLoadingService;
@synthesize isProcessingTabSwitcherCommand;
@synthesize isProcessingVoiceSearchCommand;
@synthesize signinInteractionCoordinator;
@synthesize dismissingTabSwitcher = _dismissingTabSwitcher;
@synthesize restoreHelper = _restoreHelper;
......@@ -756,11 +754,6 @@ void MainControllerAuthenticationServiceDelegate::ClearBrowsingData(
return [[PreviousSessionInfo sharedInstance] isFirstSessionAfterUpgrade];
}
- (BOOL)isSettingsViewPresented {
return [self.sceneController hasSettingsNavigationController] ||
self.signinInteractionCoordinator.isSettingsViewPresented;
}
#pragma mark - StartupInformation implementation.
- (FirstUserActionRecorder*)firstUserActionRecorder {
......@@ -784,9 +777,8 @@ void MainControllerAuthenticationServiceDelegate::ClearBrowsingData(
}
- (void)stopChromeMain {
// The UI should be stopped before the models they observe are stopped.
[self.signinInteractionCoordinator cancel];
self.signinInteractionCoordinator = nil;
// Teardown UI state that is associated with scenes.
[self.sceneController teardownUI];
[_mainCoordinator stop];
_mainCoordinator = nil;
......
......@@ -18,7 +18,6 @@
@class BrowserViewController;
@class BrowserViewWrangler;
@class HistoryCoordinator;
@class SigninInteractionCoordinator;
@class TabGridCoordinator;
@protocol BrowserInterfaceProvider;
@protocol TabSwitcher;
......@@ -56,11 +55,6 @@ enum class TabSwitcherDismissalMode { NONE, NORMAL, INCOGNITO };
// exclusive chrome commands sent at nearly the same time.
@property(nonatomic, assign) BOOL isProcessingTabSwitcherCommand;
@property(nonatomic, assign) BOOL isProcessingVoiceSearchCommand;
// The SigninInteractionCoordinator to present Sign In UI. It is created the
// first time Sign In UI is needed to be presented and should not be destroyed
// while the UI is presented.
@property(nonatomic, strong)
SigninInteractionCoordinator* signinInteractionCoordinator;
// If YES, the tab switcher is currently active.
@property(nonatomic, assign, getter=isTabSwitcherActive)
......@@ -69,11 +63,6 @@ enum class TabSwitcherDismissalMode { NONE, NORMAL, INCOGNITO };
// YES while animating the dismissal of tab switcher.
@property(nonatomic, assign) BOOL dismissingTabSwitcher;
// Returns YES if the settings are presented, either from
// self.settingsNavigationController or from SigninInteractionCoordinator.
@property(nonatomic, assign, readonly, getter=isSettingsViewPresented)
BOOL settingsViewPresented;
// If not NONE, the current BVC should be switched to this BVC on completion
// of tab switcher dismissal.
@property(nonatomic, assign)
......
......@@ -60,15 +60,18 @@ class ChromeBrowserState;
- (void)presentSignedInAccountsViewControllerForBrowserState:
(ios::ChromeBrowserState*)browserState;
// Returns YES if the settings navigation controller exists.
- (BOOL)hasSettingsNavigationController;
// Clears incognito data that is specific to iOS and won't be cleared by
// deleting the browser state.
- (void)clearIOSSpecificIncognitoData;
- (void)activateBVCAndMakeCurrentBVCPrimary;
#pragma mark - iOS 12 compat
// Method called on SceneController when the scene disconnects. Exposed here for
// iOS 12 compatibility.
- (void)teardownUI;
@end
#endif // IOS_CHROME_BROWSER_UI_MAIN_SCENE_CONTROLLER_GUTS_H_
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