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

Unified Diff: ios/shared/chrome/browser/tabs/web_state_list_observer_bridge.h

Issue 2703333006: Move the notion of current Tab from TabModel to WebStateList. (Closed)
Patch Set: Rebase. Created 3 years, 10 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/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 3cfbe2da7394ae0f74444167ac1277bf6713a4c6..e412fb288dd13cd99c2d34959ebe4636d16ffc58 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
@@ -41,6 +41,16 @@
didDetachWebState:(web::WebState*)webState
atIndex:(int)index;
+// 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
+ didChangeActiveWebState:(web::WebState*)newWebState
+ oldWebState:(web::WebState*)oldWebState
+ atIndex:(int)atIndex
+ userAction:(BOOL)userAction;
+
@end
// Observer that bridges WebStateList events to an Objective-C observer that
@@ -66,6 +76,11 @@ class WebStateListObserverBridge : public WebStateListObserver {
void WebStateDetachedAt(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,
+ int active_index,
+ bool user_action) override;
id<WebStateListObserving> observer_;

Powered by Google App Engine
This is Rietveld 408576698