diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 23:17:33 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-10 23:17:33 +0000 |
commit | ee49695d22fe52592053e393da9836e80b9a3346 (patch) | |
tree | cb831d93ea70a5f7061a872d89dd3cb263fa73e9 /chrome/browser/automation/automation_util.cc | |
parent | f61074ebe2568520845519dc8a8c0831dac85c3e (diff) | |
download | chromium_src-ee49695d22fe52592053e393da9836e80b9a3346.zip chromium_src-ee49695d22fe52592053e393da9836e80b9a3346.tar.gz chromium_src-ee49695d22fe52592053e393da9836e80b9a3346.tar.bz2 |
Remove TabStripModel wrapper use.
BUG=167548
TEST=no functional change
Review URL: https://chromiumcodereview.appspot.com/11674002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176197 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_util.cc')
-rw-r--r-- | chrome/browser/automation/automation_util.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/automation/automation_util.cc b/chrome/browser/automation/automation_util.cc index d0bc0df..2554b27 100644 --- a/chrome/browser/automation/automation_util.cc +++ b/chrome/browser/automation/automation_util.cc @@ -27,7 +27,6 @@ #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" -#include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/view_type_utils.h" #include "chrome/common/automation_id.h" @@ -163,9 +162,9 @@ WebContents* GetWebContentsAt(int browser_index, int tab_index) { if (tab_index < 0) return NULL; Browser* browser = GetBrowserAt(browser_index); - if (!browser || tab_index >= browser->tab_count()) + if (!browser || tab_index >= browser->tab_strip_model()->count()) return NULL; - return chrome::GetWebContentsAt(browser, tab_index); + return browser->tab_strip_model()->GetWebContentsAt(tab_index); } #if defined(OS_CHROMEOS) @@ -208,8 +207,10 @@ Browser* GetBrowserForTab(WebContents* tab) { BrowserList::const_iterator browser_iter = BrowserList::begin(); for (; browser_iter != BrowserList::end(); ++browser_iter) { Browser* browser = *browser_iter; - for (int tab_index = 0; tab_index < browser->tab_count(); ++tab_index) { - if (chrome::GetWebContentsAt(browser, tab_index) == tab) + for (int tab_index = 0; + tab_index < browser->tab_strip_model()->count(); + ++tab_index) { + if (browser->tab_strip_model()->GetWebContentsAt(tab_index) == tab) return browser; } } |