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

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

Issue 7134026: Multi-tab: Renaming TabStripModel::GetSelectedTabContents to GetActiveTabContents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renaming in tab_strip_controller.mm too. Created 9 years, 6 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.h ('k') | chrome/browser/tabs/tab_strip_model_order_controller.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.cc
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 40f7d60303284116769074c99fb9edb0eafb2631..35aa0d12e61a29bfefda6d63eec0a48b796537e5 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -128,10 +128,10 @@ void TabStripModel::InsertTabContentsAt(int index,
// to clear this bit.
closing_all_ = false;
- // Have to get the selected contents before we monkey with |contents_|
- // otherwise we run into problems when we try to change the selected contents
+ // Have to get the active contents before we monkey with |contents_|
+ // otherwise we run into problems when we try to change the active contents
// since the old contents and the new contents will be the same...
- TabContentsWrapper* selected_contents = GetSelectedTabContents();
+ TabContentsWrapper* selected_contents = GetActiveTabContents();
TabContentsData* data = new TabContentsData(contents);
data->pinned = pin;
if ((add_types & ADD_INHERIT_GROUP) && selected_contents) {
@@ -245,7 +245,7 @@ void TabStripModel::ActivateTabAt(int index, bool user_gesture) {
bool had_multi = selection_model_.selected_indices().size() > 1;
TabContentsWrapper* old_contents =
(active_index() == TabStripSelectionModel::kUnselectedIndex) ?
- NULL : GetSelectedTabContents();
+ NULL : GetActiveTabContents();
selection_model_.SetSelectedIndex(index);
TabContentsWrapper* new_contents = GetContentsAt(index);
if (old_contents != new_contents && old_contents) {
@@ -310,7 +310,7 @@ void TabStripModel::MoveSelectedTabsTo(int index) {
selected_count - selected_mini_count);
}
-TabContentsWrapper* TabStripModel::GetSelectedTabContents() const {
+TabContentsWrapper* TabStripModel::GetActiveTabContents() const {
return GetTabContentsAt(active_index());
}
@@ -669,7 +669,7 @@ void TabStripModel::AddTabContents(TabContentsWrapper* contents,
// initial layout and not recalculated later, we need to ensure the first
// layout is performed with sane view dimensions even when we're opening a
// new background tab.
- if (TabContentsWrapper* old_contents = GetSelectedTabContents()) {
+ if (TabContentsWrapper* old_contents = GetActiveTabContents()) {
if ((add_types & ADD_ACTIVE) == 0) {
contents->tab_contents()->view()->
SizeContents(old_contents->tab_contents()->
« no previous file with comments | « chrome/browser/tabs/tab_strip_model.h ('k') | chrome/browser/tabs/tab_strip_model_order_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698