Index: ios/shared/chrome/browser/tabs/web_state_list_observer.h |
diff --git a/ios/shared/chrome/browser/tabs/web_state_list_observer.h b/ios/shared/chrome/browser/tabs/web_state_list_observer.h |
index 4c725fb24a8ff5776fb61fa1a3c1767671875cd2..4d4134162f0962d7970e212e11c32ba7bf9e4b13 100644 |
--- a/ios/shared/chrome/browser/tabs/web_state_list_observer.h |
+++ b/ios/shared/chrome/browser/tabs/web_state_list_observer.h |
@@ -39,12 +39,24 @@ class WebStateListObserver { |
web::WebState* new_web_state, |
int index); |
+ // Invoked before the specified WebState is detached from the WebStateList. |
+ // The WebState is still valid and still in the WebStateList. |
+ virtual void WillDetachWebStateAt(WebStateList* web_state_list, |
+ web::WebState* web_state, |
+ int index); |
+ |
// Invoked after the WebState at the specified index has been detached. The |
// WebState is still valid but is no longer in the WebStateList. |
virtual void WebStateDetachedAt(WebStateList* web_state_list, |
web::WebState* web_state, |
int index); |
+ // Invoked before the specified WebState is destroyed via the WebStateList. |
+ // The WebState is still valid but is no longer in the WebStateList. |
+ virtual void WillCloseWebStateAt(WebStateList* web_state_list, |
+ web::WebState* web_state, |
+ int index); |
+ |
// Invoked after |new_web_state| was activated at the specified index. Both |
// WebState are either valid or null (if there was no selection or there is |
// no selection). If the change is due to an user action, |user_action| will |