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

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

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_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tabs/tab_strip_model_observer.cc
diff --git a/chrome/browser/tabs/tab_strip_model_observer.cc b/chrome/browser/tabs/tab_strip_model_observer.cc
index f20746abeeafac2624dbc4268f691f173f05d54e..b6d0fef6399d5fef4340ba4d56b6660847db0ccc 100644
--- a/chrome/browser/tabs/tab_strip_model_observer.cc
+++ b/chrome/browser/tabs/tab_strip_model_observer.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/tabs/tab_strip_model_observer.h"
+#include "chrome/browser/tabs/tab_strip_model.h"
+
void TabStripModelObserver::TabInsertedAt(TabContentsWrapper* contents,
int index,
bool foreground) {
@@ -21,6 +23,17 @@ void TabStripModelObserver::TabDetachedAt(TabContentsWrapper* contents,
void TabStripModelObserver::TabDeselected(TabContentsWrapper* contents) {
}
+void TabStripModelObserver::TabSelectionChanged(
+ TabStripModel* model,
+ TabContentsWrapper* old_contents,
+ bool user_gesture) {
+ TabContentsWrapper* new_contents = model->GetSelectedTabContents();
+ if (new_contents != old_contents) {
+ TabSelectedAt(old_contents, new_contents, model->selected_index(),
+ user_gesture);
+ }
+}
+
void TabStripModelObserver::TabSelectedAt(TabContentsWrapper* old_contents,
TabContentsWrapper* new_contents,
int index,
« no previous file with comments | « chrome/browser/tabs/tab_strip_model_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698