diff options
| author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 15:58:55 +0000 |
|---|---|---|
| committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 15:58:55 +0000 |
| commit | cecc93a46dd560fe4157af3d098092eb395324d3 (patch) | |
| tree | 18e511cec0772c03f0109bb8a24bd9ad95a4e3fd /chrome/browser/automation/testing_automation_provider.cc | |
| parent | 07efbd20cead99d9b46df250e6e562bf1696cd4b (diff) | |
| download | chromium_src-cecc93a46dd560fe4157af3d098092eb395324d3.zip chromium_src-cecc93a46dd560fe4157af3d098092eb395324d3.tar.gz chromium_src-cecc93a46dd560fe4157af3d098092eb395324d3.tar.bz2 | |
Replace Browser::AddTabWithURL(...) with:
- Browser::AddSelectedTabWithURL(const GURL& url, PageTransition::Type transition)
-> A good many callsites just wanted a way to open a tab somewhere and select it.
- Browser::AddTabWithURL(AddTabWithURLParams* params)
-> For the callsites with specialized needs, this new signature allows the parameter set to change as features are added without having to update a bunch of callers every time.
BUG=none
TEST=existing unit tests
Review URL: http://codereview.chromium.org/3599006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61517 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/testing_automation_provider.cc')
| -rw-r--r-- | chrome/browser/automation/testing_automation_provider.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 7184780..b0c2df5 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -492,12 +492,11 @@ void TestingAutomationProvider::AppendTab(int handle, const GURL& url, if (browser_tracker_->ContainsHandle(handle)) { Browser* browser = browser_tracker_->GetResource(handle); observer = AddTabStripObserver(browser, reply_message); - TabContents* tab_contents = browser->AddTabWithURL( - url, GURL(), PageTransition::TYPED, -1, TabStripModel::ADD_SELECTED, - NULL, std::string(), &browser); - if (tab_contents) { + TabContents* contents = + browser->AddSelectedTabWithURL(url, PageTransition::TYPED); + if (contents) { append_tab_response = - GetIndexForNavigationController(&tab_contents->controller(), browser); + GetIndexForNavigationController(&contents->controller(), browser); } } |
