diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-06 08:50:23 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-06 08:50:23 +0000 |
commit | 5bf053ef488c81f6ec822de35cab79188c74f9dd (patch) | |
tree | 0cef89cb7594a5805fd67633fe60b6bf3d675417 /chrome/browser/browser.cc | |
parent | db6f5f898d9513d94efb1b066e972715e8d38e83 (diff) | |
download | chromium_src-5bf053ef488c81f6ec822de35cab79188c74f9dd.zip chromium_src-5bf053ef488c81f6ec822de35cab79188c74f9dd.tar.gz chromium_src-5bf053ef488c81f6ec822de35cab79188c74f9dd.tar.bz2 |
Change Browser::GetIndexOfController to GetIndexOfTabContents. Now that we
don't have tab contents switching, identifying tabs by their controller is
weird, so we should gradually move to only using TabContents*.
Review URL: http://codereview.chromium.org/115018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 45c6108..e3bd3fe 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1179,7 +1179,8 @@ 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_.GetIndexOfController(controller); + int index = (*it)->tabstrip_model_.GetIndexOfTabContents( + controller->tab_contents()); if (index != TabStripModel::kNoTab) { if (index_result) *index_result = index; @@ -2272,7 +2273,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_.GetIndexOfController(&source->controller()), true); + tabstrip_model_.GetIndexOfTabContents(source), true); } // If the only updates were synchronously handled above, we're done. @@ -2346,7 +2347,7 @@ void Browser::ProcessPendingUIUpdates() { if (flags & TabContents::INVALIDATE_TAB) { tabstrip_model_.UpdateTabContentsStateAt( - tabstrip_model_.GetIndexOfController(&contents->controller()), false); + tabstrip_model_.GetIndexOfTabContents(contents), false); window_->UpdateTitleBar(); if (contents == GetSelectedTabContents()) { |