summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 08:50:23 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-06 08:50:23 +0000
commit5bf053ef488c81f6ec822de35cab79188c74f9dd (patch)
tree0cef89cb7594a5805fd67633fe60b6bf3d675417 /chrome/browser/automation/automation_provider.cc
parentdb6f5f898d9513d94efb1b066e972715e8d38e83 (diff)
downloadchromium_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/automation/automation_provider.cc')
-rw-r--r--chrome/browser/automation/automation_provider.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 9e87744..5b8b205 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -878,7 +878,7 @@ void AutomationProvider::RemoveLoginHandler(NavigationController* tab) {
int AutomationProvider::GetIndexForNavigationController(
const NavigationController* controller, const Browser* parent) const {
DCHECK(parent);
- return parent->GetIndexOfController(controller);
+ return parent->GetIndexOfTabContents(controller->tab_contents());
}
void AutomationProvider::OnMessageReceived(const IPC::Message& message) {
@@ -1784,7 +1784,8 @@ void AutomationProvider::GetTabIndex(int handle, int* tabstrip_index) {
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
Browser* browser = Browser::GetBrowserForController(tab, NULL);
- *tabstrip_index = browser->tabstrip_model()->GetIndexOfController(tab);
+ *tabstrip_index = browser->tabstrip_model()->GetIndexOfTabContents(
+ tab->tab_contents());
}
}