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

Unified Diff: chrome/browser/tabs/tab_strip_model_observer.h

Issue 6591097: Changes semantics of TabSelectedAt. For multi-selection the TabStrip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Convert to a new method Created 9 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
« no previous file with comments | « chrome/browser/tabs/tab_strip_model.cc ('k') | chrome/browser/tabs/tab_strip_model_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « chrome/browser/tabs/tab_strip_model.cc ('k') | chrome/browser/tabs/tab_strip_model_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698