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

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

Issue 2775623002: [ios] WebStateList owns all WebState it manages. (Closed)
Patch Set: Fix gn check Created 3 years, 8 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
« no previous file with comments | « ios/chrome/browser/tabs/tab_model_closing_web_state_observer.mm ('k') | ios/chrome/browser/tabs/tab_model_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698