summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r--chrome/browser/browser.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index e3bd3fe..45c6108 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1179,8 +1179,7 @@ Browser* Browser::GetBrowserForController(
const NavigationController* controller, int* index_result) {
BrowserList::const_iterator it;
for (it = BrowserList::begin(); it != BrowserList::end(); ++it) {
- int index = (*it)->tabstrip_model_.GetIndexOfTabContents(
- controller->tab_contents());
+ int index = (*it)->tabstrip_model_.GetIndexOfController(controller);
if (index != TabStripModel::kNoTab) {
if (index_result)
*index_result = index;
@@ -2273,7 +2272,7 @@ void Browser::ScheduleUIUpdate(const TabContents* source,
// this for any tab so they start & stop quickly, but the source can be
// NULL, so we have to check for that.
tabstrip_model_.UpdateTabContentsStateAt(
- tabstrip_model_.GetIndexOfTabContents(source), true);
+ tabstrip_model_.GetIndexOfController(&source->controller()), true);
}
// If the only updates were synchronously handled above, we're done.
@@ -2347,7 +2346,7 @@ void Browser::ProcessPendingUIUpdates() {
if (flags & TabContents::INVALIDATE_TAB) {
tabstrip_model_.UpdateTabContentsStateAt(
- tabstrip_model_.GetIndexOfTabContents(contents), false);
+ tabstrip_model_.GetIndexOfController(&contents->controller()), false);
window_->UpdateTitleBar();
if (contents == GetSelectedTabContents()) {