diff options
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r-- | chrome/browser/tabs/tab_strip_model.cc | 11 | ||||
-rw-r--r-- | chrome/browser/tabs/tab_strip_model.h | 4 | ||||
-rw-r--r-- | chrome/browser/tabs/tab_strip_model_order_controller.cc | 2 | ||||
-rw-r--r-- | chrome/browser/tabs/tab_strip_model_unittest.cc | 2 |
4 files changed, 1 insertions, 18 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc index e1a93f3..58b15f5 100644 --- a/chrome/browser/tabs/tab_strip_model.cc +++ b/chrome/browser/tabs/tab_strip_model.cc @@ -199,17 +199,6 @@ int TabStripModel::GetIndexOfTabContents(const TabContents* contents) const { return kNoTab; } -int TabStripModel::GetIndexOfController( - const NavigationController* controller) const { - int index = 0; - TabContentsDataVector::const_iterator iter = contents_data_.begin(); - for (; iter != contents_data_.end(); ++iter, ++index) { - if (&(*iter)->contents->controller() == controller) - return index; - } - return kNoTab; -} - void TabStripModel::UpdateTabContentsStateAt(int index, bool loading_only) { DCHECK(ContainsIndex(index)); diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h index 7f496c8..266860c 100644 --- a/chrome/browser/tabs/tab_strip_model.h +++ b/chrome/browser/tabs/tab_strip_model.h @@ -306,10 +306,6 @@ class TabStripModel : public NotificationObserver { // is not in this TabStripModel. int GetIndexOfTabContents(const TabContents* contents) const; - // Returns the index of the specified NavigationController, or -1 if it is - // not in this TabStripModel. - int GetIndexOfController(const NavigationController* controller) const; - // Notify any observers that the TabContents at the specified index has // changed in some way. Loading only specifies whether only the loading state // has changed. diff --git a/chrome/browser/tabs/tab_strip_model_order_controller.cc b/chrome/browser/tabs/tab_strip_model_order_controller.cc index 1db0525..70530b0 100644 --- a/chrome/browser/tabs/tab_strip_model_order_controller.cc +++ b/chrome/browser/tabs/tab_strip_model_order_controller.cc @@ -78,7 +78,7 @@ int TabStripModelOrderController::DetermineNewSelectedIndex( // If we can't find a subsequent group member, just fall back to the // parent_opener itself. Note that we use "group" here since opener is // reset by select operations.. - index = tabstrip_->GetIndexOfController(parent_opener); + index = tabstrip_->GetIndexOfTabContents(parent_opener->tab_contents()); if (index != TabStripModel::kNoTab) return GetValidIndex(index, removing_index); } diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc index a5b63a7..6e2dd80 100644 --- a/chrome/browser/tabs/tab_strip_model_unittest.cc +++ b/chrome/browser/tabs/tab_strip_model_unittest.cc @@ -372,8 +372,6 @@ TEST_F(TabStripModelTest, TestBasicAPI) { EXPECT_EQ(contents1, tabstrip.GetTabContentsAt(1)); EXPECT_EQ(0, tabstrip.GetIndexOfTabContents(contents2)); EXPECT_EQ(1, tabstrip.GetIndexOfTabContents(contents1)); - EXPECT_EQ(0, tabstrip.GetIndexOfController(&contents2->controller())); - EXPECT_EQ(1, tabstrip.GetIndexOfController(&contents1->controller())); } // Test UpdateTabContentsStateAt |