diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-06 06:44:39 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-06 06:44:39 +0000 |
commit | 5a4940befecc4e2c5e73ade51683ced6b2247ee6 (patch) | |
tree | f198619bbca9cc404ae1270866d779b32dc1c3cb /chrome/browser/extensions | |
parent | 53761253f5a95f72bbd2bf5acaf91a0cbe6a55f7 (diff) | |
download | chromium_src-5a4940befecc4e2c5e73ade51683ced6b2247ee6.zip chromium_src-5a4940befecc4e2c5e73ade51683ced6b2247ee6.tar.gz chromium_src-5a4940befecc4e2c5e73ade51683ced6b2247ee6.tar.bz2 |
honor index in createTab()
BUG=11200
R=brettw,beng
Review URL: http://codereview.chromium.org/99300
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15392 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r-- | chrome/browser/extensions/extension_tabs_module.cc | 14 | ||||
-rw-r--r-- | chrome/browser/extensions/extensions_service.cc | 2 |
2 files changed, 6 insertions, 10 deletions
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index d219152..5a39d67 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -201,13 +201,9 @@ bool CreateWindowFunction::RunImpl() { } Browser *new_window = Browser::Create(dispatcher_->profile()); - if (url->is_valid()) { - new_window->AddTabWithURL(*(url.get()), - GURL(), PageTransition::LINK, - true, -1, NULL); - } else { - new_window->NewTab(); - } + new_window->AddTabWithURL(*(url.get()), GURL(), PageTransition::LINK, true, + -1, false, NULL); + new_window->window()->SetBounds(bounds); new_window->window()->Show(); @@ -315,7 +311,7 @@ bool CreateTabFunction::RunImpl() { // -favIconUrl std::string url_string; - scoped_ptr<GURL> url; + scoped_ptr<GURL> url(new GURL()); if (args->HasKey(kUrlKey)) { EXTENSION_FUNCTION_VALIDATE(args->GetString(kUrlKey, &url_string)); url.reset(new GURL(url_string)); @@ -346,7 +342,7 @@ bool CreateTabFunction::RunImpl() { } TabContents* contents = browser->AddTabWithURL(*(url.get()), GURL(), - PageTransition::LINK, selected, index, NULL); + PageTransition::LINK, selected, index, true, NULL); index = tab_strip->GetIndexOfTabContents(contents); // Return data about the newly created tab. diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 5e9c221..338a2ce 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -206,7 +206,7 @@ void ExtensionsService::OnExtensionInstalled(Extension* extension, !browser->window()->IsBookmarkBarVisible() && !extension->toolstrips().empty()) browser->AddTabWithURL(GURL(chrome::kChromeUINewTabURL), GURL(), - PageTransition::LINK, true, -1, NULL); + PageTransition::LINK, true, -1, false, NULL); } ExtensionView* ExtensionsService::CreateView(Extension* extension, |