Index: chrome/browser/tabs/tab_strip_model_observer.h |
diff --git a/chrome/browser/tabs/tab_strip_model_observer.h b/chrome/browser/tabs/tab_strip_model_observer.h |
index 2eafec03b446819241e10693f6ea2621baa38829..ecd3dd0214f86842c97556dddf706d38e97150b8 100644 |
--- a/chrome/browser/tabs/tab_strip_model_observer.h |
+++ b/chrome/browser/tabs/tab_strip_model_observer.h |
@@ -61,10 +61,27 @@ class TabStripModelObserver { |
// happens. |
virtual void TabDeselected(TabContentsWrapper* contents); |
+ // Invoked any time the selection may have changed. |old_contents| identifies |
+ // the previously selected contents. It is entirely possible for the newly |
+ // selected tab contents to match |old_contents|. |user_gesture| specifies |
+ // whether or not this was done by a user input event (e.g. clicking on a tab, |
+ // keystroke) or as a side-effect of some other function. |
+ // |
+ // This implementation invokes |TabSelectedAt| only if the new and old |
+ // contents differ. If you only care about when the selected contents changes, |
+ // override |TabSelectedAt|. |
+ virtual void TabSelectionChanged(TabStripModel* model, |
+ TabContentsWrapper* old_contents, |
+ bool user_gesture); |
+ |
// The selected TabContents changed from |old_contents| to |new_contents| at |
// |index|. |user_gesture| specifies whether or not this was done by a user |
// input event (e.g. clicking on a tab, keystroke) or as a side-effect of |
// some other function. |
+ // |
+ // NOTE: this is only invoked when the selected tab contents changes, if you |
+ // care about all changes to the selection, override |TabSelectionChanged| |
+ // instead. |
virtual void TabSelectedAt(TabContentsWrapper* old_contents, |
TabContentsWrapper* new_contents, |
int index, |