Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: ios/chrome/browser/tabs/tab_model_observers_bridge.mm

Issue 2775623002: [ios] WebStateList owns all WebState it manages. (Closed)
Patch Set: Fix ios_chrome_unittests. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 2fc02d26f9a5b88501a8fc3b45141983c32d1ffa..1d212f178e41480b7e45ff8eea221b4df9e985a7 100644
--- a/ios/chrome/browser/tabs/tab_model_observers_bridge.mm
+++ b/ios/chrome/browser/tabs/tab_model_observers_bridge.mm
@@ -96,4 +96,12 @@
atIndex:static_cast<NSUInteger>(atIndex)];
}
+- (void)webStateList:(WebStateList*)webStateList
+ willDetachWebState:(web::WebState*)webState
+ atIndex:(int)atIndex {
+ DCHECK_GE(atIndex, 0);
+ [_tabModelObservers tabModel:_tabModel
+ willRemoveTab:LegacyTabHelper::GetTabForWebState(webState)];
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698