Commit 6980138f authored by Mark Cogan's avatar Mark Cogan Committed by Commit Bot

[iOS] Remove legacy TabModel APIs.

After crrev.com/c/1796358, some downstream code still needs the old
TabModel -initWithSessionService:browserState and -browserStateDestroyed
methods. Once the CL removing that usage lands, this CL can land,
remove the old APIs.

Change-Id: I02f82f79195b524e043c9ea41f3f961197cc9fd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1827416Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Mark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701095}
parent 2102c5ba
......@@ -82,10 +82,6 @@ NSUInteger const kTabPositionAutomatically = NSNotFound;
webStateList:(WebStateList*)webStateList
NS_DESIGNATED_INITIALIZER;
// Temporary backwards compatibility init which creates a webStateList.
- (instancetype)initWithSessionService:(SessionServiceIOS*)service
browserState:(ios::ChromeBrowserState*)browserState;
- (instancetype)init NS_UNAVAILABLE;
// Add/modify tabs.
......@@ -141,9 +137,6 @@ NSUInteger const kTabPositionAutomatically = NSNotFound;
// the tab model after this is called is unsafe.
- (void)disconnect;
// Legacy method name for -disconnect, will be deleted very soon.
- (void)browserStateDestroyed;
@end
#endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_H_
......@@ -243,10 +243,6 @@ void RecordMainFrameNavigationMetric(web::WebState* web_state) {
// Used to observe owned Tabs' WebStates.
std::unique_ptr<web::WebStateObserver> _webStateObserver;
// Legacy ivars for backwards compatibility with some tests
std::unique_ptr<WebStateListDelegate> _legacyWebStateListDelegate;
std::unique_ptr<WebStateList> _legacyOwnedWebStateList;
}
// Session window for the contents of the tab model.
......@@ -376,17 +372,6 @@ void RecordMainFrameNavigationMetric(web::WebState* web_state) {
return self;
}
- (instancetype)initWithSessionService:(SessionServiceIOS*)service
browserState:(ios::ChromeBrowserState*)browserState {
_legacyWebStateListDelegate = std::make_unique<BrowserWebStateListDelegate>();
_legacyOwnedWebStateList =
std::make_unique<WebStateList>(_legacyWebStateListDelegate.get());
return [self initWithSessionService:service
browserState:browserState
webStateList:_legacyOwnedWebStateList.get()];
}
- (web::WebState*)insertWebStateWithURL:(const GURL&)URL
referrer:(const web::Referrer&)referrer
transition:(ui::PageTransition)transition
......@@ -520,10 +505,6 @@ void RecordMainFrameNavigationMetric(web::WebState* web_state) {
_webStateObserver.reset();
}
- (void)browserStateDestroyed {
[self disconnect];
}
#pragma mark - SessionWindowRestoring(public)
- (void)saveSessionImmediately:(BOOL)immediately {
......
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