Index: ios/chrome/browser/tabs/tab_model_observers_bridge.mm |
diff --git a/ios/chrome/browser/tabs/tab_model_observers_bridge.mm b/ios/chrome/browser/tabs/tab_model_observers_bridge.mm |
index 76da2fca4ceb8226007b996089055235f28f7442..780f14739dac169e11625af34ac41f41b710bf1a 100644 |
--- a/ios/chrome/browser/tabs/tab_model_observers_bridge.mm |
+++ b/ios/chrome/browser/tabs/tab_model_observers_bridge.mm |
@@ -75,4 +75,21 @@ |
[_tabModelObservers tabModelDidChangeTabCount:_tabModel]; |
} |
+- (void)webStateList:(WebStateList*)webStateList |
+ didChangeActiveWebState:(web::WebState*)newWebState |
+ oldWebState:(web::WebState*)oldWebState |
+ atIndex:(int)atIndex |
+ userAction:(BOOL)userAction { |
+ DCHECK_GE(atIndex, 0); |
+ if (!newWebState) |
+ return; |
+ |
+ Tab* oldTab = |
+ oldWebState ? LegacyTabHelper::GetTabForWebState(oldWebState) : nil; |
+ [_tabModelObservers tabModel:_tabModel |
+ didChangeActiveTab:LegacyTabHelper::GetTabForWebState(newWebState) |
+ previousTab:oldTab |
+ atIndex:static_cast<NSUInteger>(atIndex)]; |
+} |
+ |
@end |