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

[multiball] Cleanup guts

Cleans up a few more now-unused methods in guts protocols.

Bug: 1045660
Change-Id: I244ef31eb8ea7ef413f64328c3515a0dac7de9c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2279884Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785319}
parent 539a421c
......@@ -27,9 +27,9 @@ class ChromeBrowserState;
@property(nonatomic, strong) CrashRestoreHelper* restoreHelper;
- (ChromeBrowserState*)mainBrowserState;
- (UIWindow*)window;
// Only for iOS 12 compat.
- (NSDictionary*)launchOptions;
- (AppState*)appState;
- (void)removeBrowsingDataForBrowserState:(ChromeBrowserState*)browserState
timePeriod:(browsing_data::TimePeriod)timePeriod
......
......@@ -302,7 +302,7 @@ const char kMultiWindowOpenInNewWindowHistogram[] =
[[URLOpenerParams alloc] initWithUIOpenURLContext:context];
[self openTabFromLaunchWithParams:params
startupInformation:self.mainController
appState:self.mainController.appState];
appState:self.sceneState.appState];
}
if (self.sceneState.connectionOptions.shortcutItem) {
[UserActivityHandler
......@@ -362,7 +362,7 @@ const char kMultiWindowOpenInNewWindowHistogram[] =
[[URLOpenerParams alloc] initWithLaunchOptions:launchOptions];
[self openTabFromLaunchWithParams:params
startupInformation:self.mainController
appState:self.mainController.appState];
appState:self.sceneState.appState];
}
if (!initializingUIInColdStart && self.tabSwitcherIsActive &&
......@@ -438,7 +438,7 @@ const char kMultiWindowOpenInNewWindowHistogram[] =
self.blockingOverlayViewController =
[[BlockingOverlayViewController alloc] init];
self.blockingOverlayViewController.blockingSceneCommandHandler =
HandlerForProtocol(self.mainController.appState.appCommandDispatcher,
HandlerForProtocol(self.sceneState.appState.appCommandDispatcher,
BlockingSceneCommands);
UIView* overlayView = self.blockingOverlayViewController.view;
[self.sceneState.window addSubview:overlayView];
......@@ -481,7 +481,7 @@ const char kMultiWindowOpenInNewWindowHistogram[] =
- (void)sceneState:(SceneState*)sceneState
receivedUserActivity:(NSUserActivity*)userActivity {
if (self.mainController.appState.isInSafeMode || !userActivity) {
if (self.sceneState.appState.isInSafeMode || !userActivity) {
return;
}
BOOL sceneIsActive =
......@@ -1953,7 +1953,7 @@ const char kMultiWindowOpenInNewWindowHistogram[] =
- (void)openURLContexts:(NSSet<UIOpenURLContext*>*)URLContexts
API_AVAILABLE(ios(13)) {
if (self.mainController.appState.isInSafeMode) {
if (self.sceneState.appState.isInSafeMode) {
return;
}
......@@ -2024,7 +2024,7 @@ const char kMultiWindowOpenInNewWindowHistogram[] =
NSMutableArray<SceneController*>* sceneControllers =
[[NSMutableArray alloc] init];
for (SceneState* sceneState in self.mainController.appState.connectedScenes) {
for (SceneState* sceneState in self.sceneState.appState.connectedScenes) {
SceneController* sceneController = sceneState.controller;
if (sceneController.mainController.mainBrowserState == mainBrowserState) {
[sceneControllers addObject:sceneController];
......
......@@ -14,22 +14,11 @@
@protocol SceneControllerGuts
- (void)dismissModalsAndOpenSelectedTabInMode:
(ApplicationModeForTabOpening)targetMode
withUrlLoadParams:
(const UrlLoadParams&)urlLoadParams
dismissOmnibox:(BOOL)dismissOmnibox
completion:(ProceduralBlock)completion;
#pragma mark - iOS 12 compat
- (void)startUpChromeUIPostCrash:(BOOL)isPostCrashLaunch
needRestoration:(BOOL)needsRestoration;
// 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