Commit fc1b4783 authored by Mohammad Refaat's avatar Mohammad Refaat Committed by Commit Bot

Remove didRemoveTab & didChangeActiveTab as TabModelObserver methods.

All their usages have been removed.

Bug: 911350
Change-Id: Iadf2b47bdb9166906d0d9f9c6298ab8d04e8963e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1621033Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662151}
parent 3060b2a1
......@@ -21,23 +21,12 @@
atIndex:(NSUInteger)index
inForeground:(BOOL)fg;
// A tab was removed at the given index.
- (void)tabModel:(TabModel*)model
didRemoveTab:(Tab*)tab
atIndex:(NSUInteger)index;
// A Tab was replaced in the model, at the given index.
- (void)tabModel:(TabModel*)model
didReplaceTab:(Tab*)oldTab
withTab:(Tab*)newTab
atIndex:(NSUInteger)index;
// A tab was activated.
- (void)tabModel:(TabModel*)model
didChangeActiveTab:(Tab*)newTab
previousTab:(Tab*)previousTab
atIndex:(NSUInteger)index;
// Some properties about the given tab changed, such as the URL or title.
- (void)tabModel:(TabModel*)model didChangeTab:(Tab*)tab;
......
......@@ -56,34 +56,4 @@
atIndex:static_cast<NSUInteger>(atIndex)];
}
- (void)webStateList:(WebStateList*)webStateList
didDetachWebState:(web::WebState*)webState
atIndex:(int)atIndex {
DCHECK_GE(atIndex, 0);
[_tabModelObservers tabModel:_tabModel
didRemoveTab:LegacyTabHelper::GetTabForWebState(webState)
atIndex:static_cast<NSUInteger>(atIndex)];
}
- (void)webStateList:(WebStateList*)webStateList
didChangeActiveWebState:(web::WebState*)newWebState
oldWebState:(web::WebState*)oldWebState
atIndex:(int)atIndex
reason:(int)reason {
if (!newWebState)
return;
// If there is no new active WebState, then it means that the atIndex will be
// set to WebStateList::kInvalidIndex, so only check for a positive index if
// there is a new WebState.
DCHECK_GE(atIndex, 0);
Tab* oldTab =
oldWebState ? LegacyTabHelper::GetTabForWebState(oldWebState) : nil;
[_tabModelObservers tabModel:_tabModel
didChangeActiveTab:LegacyTabHelper::GetTabForWebState(newWebState)
previousTab:oldTab
atIndex:static_cast<NSUInteger>(atIndex)];
}
@end
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