Chromium Code Reviews| Index: ios/shared/chrome/browser/tabs/web_state_list_observer_bridge.h |
| diff --git a/ios/shared/chrome/browser/tabs/web_state_list_observer_bridge.h b/ios/shared/chrome/browser/tabs/web_state_list_observer_bridge.h |
| index e412fb288dd13cd99c2d34959ebe4636d16ffc58..590ac576ffe5f9d2bebac9175a5afccf1b1cac17 100644 |
| --- a/ios/shared/chrome/browser/tabs/web_state_list_observer_bridge.h |
| +++ b/ios/shared/chrome/browser/tabs/web_state_list_observer_bridge.h |
| @@ -33,13 +33,35 @@ |
| - (void)webStateList:(WebStateList*)webStateList |
| didReplaceWebState:(web::WebState*)oldWebState |
| withWebState:(web::WebState*)newWebState |
| - atIndex:(int)index; |
| + atIndex:(int)atIndex; |
| + |
| +// Invoked before the specified WebState is detached from the WebStateList. |
| +// The WebState is still valid and still in the WebStateList. |
| +- (void)webStateList:(WebStateList*)webStateList |
| + willDetachWebState:(web::WebState*)webState |
| + atIndex:(int)atIndex; |
| // Invoked after the WebState at the specified index has been detached. The |
| // WebState is still valid but is no longer in the WebStateList. |
| - (void)webStateList:(WebStateList*)webStateList |
| didDetachWebState:(web::WebState*)webState |
| - atIndex:(int)index; |
| + atIndex:(int)atIndex; |
| + |
| +// Invoked before the specified WebState is destroyed via the WebStateList. |
| +// The WebState is still valid but is no longer in the WebStateList. |
| +- (void)webStateList:(WebStateList*)webStateList |
| + willCloseWebState:(web::WebState*)webState |
| + atIndex:(int)atIndex; |
| + |
| +// Invoked after |newWebState| 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, |userAction| will |
| +// be true. |
| +- (void)webStateList:(WebStateList*)webStateList |
|
rohitrao (ping after 24h)
2017/03/24 01:20:52
Inadvertent duplication?
sdefresne
2017/03/24 09:26:18
Cause by cherry-picking/rebasing, yes. Thank you.
|
| + didChangeActiveWebState:(web::WebState*)newWebState |
| + oldWebState:(web::WebState*)oldWebState |
| + atIndex:(int)atIndex |
| + userAction:(BOOL)userAction; |
| // Invoked after |newWebState| was activated at the specified index. Both |
| // WebState are either valid or null (if there was no selection or there is |
| @@ -73,9 +95,15 @@ class WebStateListObserverBridge : public WebStateListObserver { |
| web::WebState* old_web_state, |
| web::WebState* new_web_state, |
| int index) override; |
| + void WillDetachWebStateAt(WebStateList* web_state_list, |
| + web::WebState* web_state, |
| + int index) override; |
| void WebStateDetachedAt(WebStateList* web_state_list, |
| web::WebState* web_state, |
| int index) override; |
| + void WillCloseWebStateAt(WebStateList* web_state_list, |
| + web::WebState* web_state, |
| + int index) override; |
| void WebStateActivatedAt(WebStateList* web_state_list, |
| web::WebState* old_web_state, |
| web::WebState* new_web_state, |