summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-24 22:06:54 +0000
committerdpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-24 22:06:54 +0000
commit3aca95d4039b0f7d4ffb3a811a94622afa7f4114 (patch)
tree14a14e82b732011beade77d70e8f78a6de738781
parent10ae1be6a6766ae1148db89c4f68e0c8ac466ad5 (diff)
downloadchromium_src-3aca95d4039b0f7d4ffb3a811a94622afa7f4114.zip
chromium_src-3aca95d4039b0f7d4ffb3a811a94622afa7f4114.tar.gz
chromium_src-3aca95d4039b0f7d4ffb3a811a94622afa7f4114.tar.bz2
Multi-tab selection: Renaming TabStripModelObserver::TabSelectedAt to ActiveTabChanged
This is done in preparation for multi-tab selection in Linux (http://codereview.chromium.org/6933037/). There was a TODO for that in tab_strip_model_observer.h:75 BUG=NONE TEST=Tab behavior should be unaffected on all platforms Review URL: http://codereview.chromium.org/7043020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86502 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/aeropeek_manager.cc14
-rw-r--r--chrome/browser/aeropeek_manager.h8
-rw-r--r--chrome/browser/extensions/extension_browser_event_router.cc2
-rw-r--r--chrome/browser/extensions/extension_browser_event_router.h8
-rw-r--r--chrome/browser/tabs/default_tab_handler.cc17
-rw-r--r--chrome/browser/tabs/default_tab_handler.h9
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc14
-rw-r--r--chrome/browser/tabs/tab_strip_model_observer.cc8
-rw-r--r--chrome/browser/tabs/tab_strip_model_observer.h14
-rw-r--r--chrome/browser/tabs/tab_strip_model_order_controller.cc2
-rw-r--r--chrome/browser/tabs/tab_strip_model_order_controller.h8
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc10
-rw-r--r--chrome/browser/ui/browser.cc8
-rw-r--r--chrome/browser/ui/browser.h8
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h8
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm2
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.h8
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.h8
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc8
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.h8
-rw-r--r--chrome/browser/ui/touch/frame/touch_browser_frame_view.cc8
-rw-r--r--chrome/browser/ui/touch/frame/touch_browser_frame_view.h8
-rw-r--r--chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc9
-rw-r--r--chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.h8
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc8
-rw-r--r--chrome/browser/ui/views/frame/browser_view.h10
-rw-r--r--chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc9
-rw-r--r--chrome/browser/ui/views/tabs/browser_tab_strip_controller.h9
31 files changed, 129 insertions, 132 deletions
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc
index 34e6ef6..e81ea50 100644
--- a/chrome/browser/aeropeek_manager.cc
+++ b/chrome/browser/aeropeek_manager.cc
@@ -848,7 +848,7 @@ void AeroPeekWindow::OnActivate(UINT action,
return;
// Ask Chrome to activate the tab associated with this thumbnail window.
- // Since TabStripModel calls AeroPeekManager::TabSelectedAt() when it
+ // Since TabStripModel calls AeroPeekManager::ActiveTabChanged() when it
// finishes activating the tab. We will move the tab focus of AeroPeek there.
if (delegate_)
delegate_->ActivateTab(tab_id_);
@@ -1111,10 +1111,10 @@ void AeroPeekManager::TabDetachedAt(TabContentsWrapper* contents, int index) {
DeleteAeroPeekWindowForTab(contents);
}
-void AeroPeekManager::TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) {
+void AeroPeekManager::ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) {
if (old_contents == new_contents)
return;
@@ -1144,7 +1144,7 @@ void AeroPeekManager::TabReplacedAt(TabStripModel* tab_strip_model,
CreateAeroPeekWindowIfNecessary(new_contents,
(index == tab_strip_model->active_index()));
// We don't need to update the selection as if |new_contents| is selected the
- // TabStripModel will send TabSelectedAt.
+ // TabStripModel will send ActiveTabChanged.
}
void AeroPeekManager::TabMoved(TabContentsWrapper* contents,
@@ -1185,7 +1185,7 @@ void AeroPeekManager::TabChangedAt(TabContentsWrapper* contents,
void AeroPeekManager::ActivateTab(int tab_id) {
// Ask TabStrip to activate this tab.
// We don't have to update thumbnails now since TabStrip will call
- // TabSelectedAt() when it actually activates this tab.
+ // ActiveTabChanged() when it actually activates this tab.
TabContents* contents = GetTabContents(tab_id);
if (contents && contents->delegate())
contents->delegate()->ActivateContents(contents);
diff --git a/chrome/browser/aeropeek_manager.h b/chrome/browser/aeropeek_manager.h
index e29ff4c..f19b606 100644
--- a/chrome/browser/aeropeek_manager.h
+++ b/chrome/browser/aeropeek_manager.h
@@ -111,10 +111,10 @@ class AeroPeekManager : public TabStripModelObserver,
int index,
bool foreground);
virtual void TabDetachedAt(TabContentsWrapper* contents, int index);
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture);
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture);
virtual void TabMoved(TabContentsWrapper* contents,
int from_index,
int to_index,
diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc
index 34e2fda..23bc94c 100644
--- a/chrome/browser/extensions/extension_browser_event_router.cc
+++ b/chrome/browser/extensions/extension_browser_event_router.cc
@@ -344,7 +344,7 @@ void ExtensionBrowserEventRouter::TabClosingAt(TabStripModel* tab_strip_model,
UnregisterForTabNotifications(contents->tab_contents());
}
-void ExtensionBrowserEventRouter::TabSelectedAt(
+void ExtensionBrowserEventRouter::ActiveTabChanged(
TabContentsWrapper* old_contents,
TabContentsWrapper* new_contents,
int index,
diff --git a/chrome/browser/extensions/extension_browser_event_router.h b/chrome/browser/extensions/extension_browser_event_router.h
index 1077fde..8939f2d 100644
--- a/chrome/browser/extensions/extension_browser_event_router.h
+++ b/chrome/browser/extensions/extension_browser_event_router.h
@@ -64,10 +64,10 @@ class ExtensionBrowserEventRouter : public TabStripModelObserver,
TabContentsWrapper* contents,
int index);
virtual void TabDetachedAt(TabContentsWrapper* contents, int index);
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture);
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture);
virtual void TabMoved(TabContentsWrapper* contents, int from_index,
int to_index);
virtual void TabChangedAt(TabContentsWrapper* contents, int index,
diff --git a/chrome/browser/tabs/default_tab_handler.cc b/chrome/browser/tabs/default_tab_handler.cc
index 1524852..57eec12 100644
--- a/chrome/browser/tabs/default_tab_handler.cc
+++ b/chrome/browser/tabs/default_tab_handler.cc
@@ -162,14 +162,14 @@ void DefaultTabHandler::TabDeselected(TabContentsWrapper* contents) {
delegate_->AsBrowser()->TabDeselected(contents);
}
-void DefaultTabHandler::TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) {
- delegate_->AsBrowser()->TabSelectedAt(old_contents,
- new_contents,
- index,
- user_gesture);
+void DefaultTabHandler::ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) {
+ delegate_->AsBrowser()->ActiveTabChanged(old_contents,
+ new_contents,
+ index,
+ user_gesture);
}
void DefaultTabHandler::TabMoved(TabContentsWrapper* contents,
@@ -202,4 +202,3 @@ void DefaultTabHandler::TabStripEmpty() {
TabHandler* TabHandler::CreateTabHandler(TabHandlerDelegate* delegate) {
return new DefaultTabHandler(delegate);
}
-
diff --git a/chrome/browser/tabs/default_tab_handler.h b/chrome/browser/tabs/default_tab_handler.h
index f59dd25..ea626e8 100644
--- a/chrome/browser/tabs/default_tab_handler.h
+++ b/chrome/browser/tabs/default_tab_handler.h
@@ -68,10 +68,10 @@ class DefaultTabHandler : public TabHandler,
int index);
virtual void TabDetachedAt(TabContentsWrapper* contents, int index);
virtual void TabDeselected(TabContentsWrapper* contents);
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture);
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture);
virtual void TabMoved(TabContentsWrapper* contents,
int from_index,
int to_index);
@@ -91,4 +91,3 @@ class DefaultTabHandler : public TabHandler,
};
#endif // CHROME_BROWSER_TABS_DEFAULT_TAB_HANDLER_H_
-
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index d1ded2f..50f9e9b 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -182,8 +182,8 @@ TabContentsWrapper* TabStripModel::ReplaceTabContentsAt(
// selected contents as selection changing.
if (active_index() == index) {
FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
- TabSelectedAt(old_contents, new_contents, active_index(),
- false));
+ ActiveTabChanged(old_contents, new_contents,
+ active_index(), false));
}
return old_contents;
}
@@ -254,8 +254,8 @@ void TabStripModel::ActivateTabAt(int index, bool user_gesture) {
}
if (old_contents != new_contents || had_multi) {
FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
- TabSelectedAt(old_contents, new_contents,
- active_index(), user_gesture));
+ ActiveTabChanged(old_contents, new_contents,
+ active_index(), user_gesture));
}
}
@@ -1220,8 +1220,8 @@ void TabStripModel::NotifyTabSelectedIfChanged(TabContentsWrapper* old_contents,
}
FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
- TabSelectedAt(last_selected_contents, new_contents,
- active_index(), user_gesture));
+ ActiveTabChanged(last_selected_contents, new_contents,
+ active_index(), user_gesture));
}
void TabStripModel::NotifySelectionChanged(int old_selected_index) {
@@ -1232,7 +1232,7 @@ void TabStripModel::NotifySelectionChanged(int old_selected_index) {
active_index() == TabStripSelectionModel::kUnselectedIndex ?
NULL : GetTabContentsAt(active_index());
FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
- TabSelectedAt(old_tab, new_tab, active_index(), true));
+ ActiveTabChanged(old_tab, new_tab, active_index(), true));
}
void TabStripModel::SelectRelativeTab(bool next) {
diff --git a/chrome/browser/tabs/tab_strip_model_observer.cc b/chrome/browser/tabs/tab_strip_model_observer.cc
index 0f5395b..cf47a0f 100644
--- a/chrome/browser/tabs/tab_strip_model_observer.cc
+++ b/chrome/browser/tabs/tab_strip_model_observer.cc
@@ -21,10 +21,10 @@ void TabStripModelObserver::TabDetachedAt(TabContentsWrapper* contents,
void TabStripModelObserver::TabDeselected(TabContentsWrapper* contents) {
}
-void TabStripModelObserver::TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) {
+void TabStripModelObserver::ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) {
}
void TabStripModelObserver::TabMoved(TabContentsWrapper* contents,
diff --git a/chrome/browser/tabs/tab_strip_model_observer.h b/chrome/browser/tabs/tab_strip_model_observer.h
index ba9df25..290d770 100644
--- a/chrome/browser/tabs/tab_strip_model_observer.h
+++ b/chrome/browser/tabs/tab_strip_model_observer.h
@@ -72,14 +72,12 @@ class TabStripModelObserver {
// was done by a user input event (e.g. clicking on a tab, keystroke) or as a
// side-effect of some other function.
//
- // TODO(sky): consider not overloading this. Instead rename this to
- // TabActivatedAt (or something) and have TabSelectionChanged as well.
- // TabSelectedAt. This requires renaming everyone to use new terms instead of
- // selection.
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture);
+ // TODO(dpapad): Add TabSelectionChanged method for when the selected tabs
+ // change.
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture);
// The specified TabContents at |from_index| was moved to |to_index|.
virtual void TabMoved(TabContentsWrapper* contents,
diff --git a/chrome/browser/tabs/tab_strip_model_order_controller.cc b/chrome/browser/tabs/tab_strip_model_order_controller.cc
index 8c8f4db..8eac1d5 100644
--- a/chrome/browser/tabs/tab_strip_model_order_controller.cc
+++ b/chrome/browser/tabs/tab_strip_model_order_controller.cc
@@ -106,7 +106,7 @@ int TabStripModelOrderController::DetermineNewSelectedIndex(
return selected_index;
}
-void TabStripModelOrderController::TabSelectedAt(
+void TabStripModelOrderController::ActiveTabChanged(
TabContentsWrapper* old_contents,
TabContentsWrapper* new_contents,
int index,
diff --git a/chrome/browser/tabs/tab_strip_model_order_controller.h b/chrome/browser/tabs/tab_strip_model_order_controller.h
index 5b1476d..2d87e3a 100644
--- a/chrome/browser/tabs/tab_strip_model_order_controller.h
+++ b/chrome/browser/tabs/tab_strip_model_order_controller.h
@@ -43,10 +43,10 @@ class TabStripModelOrderController : public TabStripModelObserver {
int DetermineNewSelectedIndex(int removed_index) const;
// Overridden from TabStripModelObserver:
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture);
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture);
private:
// Returns a valid index to be selected after the tab at |removing_index| is
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 3077f8c..542ad4a 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -344,10 +344,10 @@ class MockTabStripModelObserver : public TabStripModelObserver {
s->foreground = foreground;
states_.push_back(s);
}
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) {
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) {
State* s = new State(new_contents, index, SELECT);
s->src_contents = old_contents;
s->user_gesture = user_gesture;
@@ -2183,7 +2183,7 @@ TEST_F(TabStripModelTest, CloseSelectedTabs) {
// Verifies that if we change the selection from a multi selection to a single
// selection, but not in a way that changes the selected_index that
-// TabSelectedAt is still invoked.
+// ActiveTabChanged is still invoked.
TEST_F(TabStripModelTest, MultipleToSingle) {
TabStripDummyDelegate delegate(NULL);
TabStripModel strip(&delegate, profile());
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 12de805..713ef9a 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2891,10 +2891,10 @@ void Browser::TabDeselected(TabContentsWrapper* contents) {
window_->GetLocationBar()->SaveStateToContents(contents->tab_contents());
}
-void Browser::TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) {
+void Browser::ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) {
if (old_contents == new_contents)
return;
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index e021805..2425b26 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -731,10 +731,10 @@ class Browser : public TabHandlerDelegate,
int index);
virtual void TabDetachedAt(TabContentsWrapper* contents, int index);
virtual void TabDeselected(TabContentsWrapper* contents);
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture);
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture);
virtual void TabMoved(TabContentsWrapper* contents,
int from_index,
int to_index);
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index 5d2d01a..ef54b450 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -1268,8 +1268,8 @@ class NotificationBridge : public NotificationObserver {
DCHECK_EQ(oldContents->tab_contents(), [oldController tabContents]);
// Simply create a new TabContentsController for |newContents| and place it
- // into the array, replacing |oldContents|. A TabSelectedAt notification will
- // follow, at which point we will install the new view.
+ // into the array, replacing |oldContents|. A ActiveTabChanged notification
+ // will follow, at which point we will install the new view.
scoped_nsobject<TabContentsController> newController(
[[TabContentsController alloc]
initWithContents:newContents->tab_contents()
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h b/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h
index 22c79c9..029da8e 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h
@@ -31,10 +31,10 @@ class TabStripModelObserverBridge : public TabStripModelObserver {
TabContentsWrapper* contents,
int index);
virtual void TabDetachedAt(TabContentsWrapper* contents, int index);
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture);
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture);
virtual void TabMoved(TabContentsWrapper* contents,
int from_index,
int to_index);
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm
index e3b6104..10b22c1 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm
@@ -48,7 +48,7 @@ void TabStripModelObserverBridge::TabDetachedAt(TabContentsWrapper* contents,
}
}
-void TabStripModelObserverBridge::TabSelectedAt(
+void TabStripModelObserverBridge::ActiveTabChanged(
TabContentsWrapper* old_contents,
TabContentsWrapper* new_contents,
int index,
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index ff48ba5..c521ff9 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -1171,10 +1171,10 @@ void BrowserWindowGtk::TabDetachedAt(TabContentsWrapper* contents, int index) {
contents_container_->DetachTab(contents);
}
-void BrowserWindowGtk::TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) {
+void BrowserWindowGtk::ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) {
if (old_contents == new_contents)
return;
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.h b/chrome/browser/ui/gtk/browser_window_gtk.h
index 537584b..fd82a64 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.h
+++ b/chrome/browser/ui/gtk/browser_window_gtk.h
@@ -143,10 +143,10 @@ class BrowserWindowGtk : public BrowserWindow,
// Overridden from TabStripModelObserver:
virtual void TabDetachedAt(TabContentsWrapper* contents, int index);
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture);
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture);
// Overridden from ActiveWindowWatcher::Observer.
virtual void ActiveWindowChanged(GdkWindow* active_window);
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
index dc81430..1a57840 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
@@ -1014,10 +1014,10 @@ void TabStripGtk::TabDetachedAt(TabContentsWrapper* contents, int index) {
GetTabAt(index)->set_closing(true);
}
-void TabStripGtk::TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) {
+void TabStripGtk::ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) {
DCHECK(index >= 0 && index < static_cast<int>(GetTabCount()));
// We have "tiny tabs" if the tabs are so tiny that the unselected ones are
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
index cdaff98..4fe7519 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
@@ -107,10 +107,10 @@ class TabStripGtk : public TabStripModelObserver,
int index,
bool foreground);
virtual void TabDetachedAt(TabContentsWrapper* contents, int index);
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* contents,
- int index,
- bool user_gesture);
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* contents,
+ int index,
+ bool user_gesture);
virtual void TabMoved(TabContentsWrapper* contents,
int from_index,
int to_index);
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 63b6e6a..063b36f 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -352,10 +352,10 @@ bool WrenchMenuModel::GetAcceleratorForCommandId(
return provider_->GetAcceleratorForCommandId(command_id, accelerator);
}
-void WrenchMenuModel::TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) {
+void WrenchMenuModel::ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) {
// The user has switched between tabs and the new tab may have a different
// zoom setting.
UpdateZoomControls();
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.h b/chrome/browser/ui/toolbar/wrench_menu_model.h
index 5b37cfe..9d5ff90 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.h
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.h
@@ -108,10 +108,10 @@ class WrenchMenuModel : public ui::SimpleMenuModel,
ui::Accelerator* accelerator) OVERRIDE;
// Overridden from TabStripModelObserver:
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) OVERRIDE;
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) OVERRIDE;
virtual void TabReplacedAt(TabStripModel* tab_strip_model,
TabContentsWrapper* old_contents,
TabContentsWrapper* new_contents,
diff --git a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
index a6d35b1..9c1dbe6 100644
--- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
+++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
@@ -217,10 +217,10 @@ bool TouchBrowserFrameView::HitTest(const gfx::Point& point) const {
return false;
}
-void TouchBrowserFrameView::TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) {
+void TouchBrowserFrameView::ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) {
if (new_contents == old_contents)
return;
diff --git a/chrome/browser/ui/touch/frame/touch_browser_frame_view.h b/chrome/browser/ui/touch/frame/touch_browser_frame_view.h
index c624e96..51fb6f7 100644
--- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.h
+++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.h
@@ -65,10 +65,10 @@ class TouchBrowserFrameView : public OpaqueBrowserFrameView,
virtual bool HitTest(const gfx::Point& point) const OVERRIDE;
// Overrridden from TabStripModelObserver.
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture);
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture);
// Overridden from NotificationObserver.
virtual void Observe(NotificationType type,
diff --git a/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc b/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc
index 7cd1f75..502fba9 100644
--- a/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc
+++ b/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.cc
@@ -303,10 +303,11 @@ void CompactLocationBarViewHost::TabClosingAt(TabStripModel* tab_strip_model,
Hide(false);
}
-void CompactLocationBarViewHost::TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) {
+void CompactLocationBarViewHost::ActiveTabChanged(
+ TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) {
current_tab_model_index_ = index;
if (new_contents && new_contents->tab_contents()->is_loading()) {
Show(false);
diff --git a/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.h b/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.h
index 1037853..606e7a2 100644
--- a/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.h
+++ b/chrome/browser/ui/views/compact_nav/compact_location_bar_view_host.h
@@ -88,10 +88,10 @@ class CompactLocationBarViewHost : public DropdownBarHost,
virtual void TabClosingAt(TabStripModel* tab_strip_model,
TabContentsWrapper* contents,
int index) OVERRIDE;
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) OVERRIDE;
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) OVERRIDE;
virtual void TabMoved(TabContentsWrapper* contents,
int from_index,
int to_index) OVERRIDE;
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 73b5baf..13fe54d 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1407,10 +1407,10 @@ void BrowserView::TabDeselected(TabContentsWrapper* contents) {
contents->view()->StoreFocus();
}
-void BrowserView::TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) {
+void BrowserView::ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) {
if (old_contents == new_contents)
return;
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index a2ef9fa..86c7c6e 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -356,10 +356,10 @@ class BrowserView : public BrowserBubbleHost,
// Overridden from TabStripModelObserver:
virtual void TabDetachedAt(TabContentsWrapper* contents, int index) OVERRIDE;
virtual void TabDeselected(TabContentsWrapper* contents) OVERRIDE;
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* new_contents,
- int index,
- bool user_gesture) OVERRIDE;
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* new_contents,
+ int index,
+ bool user_gesture) OVERRIDE;
virtual void TabReplacedAt(TabStripModel* tab_strip_model,
TabContentsWrapper* old_contents,
TabContentsWrapper* new_contents,
@@ -540,7 +540,7 @@ class BrowserView : public BrowserBubbleHost,
void UpdateAcceleratorMetrics(const views::Accelerator& accelerator,
int command_id);
- // Invoked from TabSelectedAt or when instant is made active. If
+ // Invoked from ActiveTabChanged or when instant is made active. If
// |change_tab_contents| is true, |new_contents| is added to the view
// hierarchy, if |change_tab_contents| is false, it's assumed |new_contents|
// has already been added to the view hierarchy.
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 299dd7a..1ae9b0f 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -340,10 +340,11 @@ void BrowserTabStripController::TabDetachedAt(TabContentsWrapper* contents,
tabstrip_->RemoveTabAt(model_index);
}
-void BrowserTabStripController::TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* contents,
- int model_index,
- bool user_gesture) {
+void BrowserTabStripController::ActiveTabChanged(
+ TabContentsWrapper* old_contents,
+ TabContentsWrapper* contents,
+ int model_index,
+ bool user_gesture) {
tabstrip_->SelectTabAt(model_->GetIndexOfTabContents(old_contents),
model_index);
}
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
index 31e2af9..b1baac4 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.h
@@ -71,10 +71,10 @@ class BrowserTabStripController : public TabStripController,
bool active) OVERRIDE;
virtual void TabDetachedAt(TabContentsWrapper* contents,
int model_index) OVERRIDE;
- virtual void TabSelectedAt(TabContentsWrapper* old_contents,
- TabContentsWrapper* contents,
- int model_index,
- bool user_gesture) OVERRIDE;
+ virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
+ TabContentsWrapper* contents,
+ int model_index,
+ bool user_gesture) OVERRIDE;
virtual void TabMoved(TabContentsWrapper* contents,
int from_model_index,
int to_model_index) OVERRIDE;
@@ -136,4 +136,3 @@ class BrowserTabStripController : public TabStripController,
};
#endif // CHROME_BROWSER_UI_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
-