Index: chrome/browser/gtk/tabs/tab_strip_gtk.cc |
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc |
index 054781546e5be01867fa69f0cf684af4c30856c2..1a891c095e805dc93f850d032fecd07ef1b47b7b 100644 |
--- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc |
+++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc |
@@ -12,6 +12,7 @@ |
#include "base/i18n/rtl.h" |
#include "base/string_util.h" |
#include "chrome/browser/autocomplete/autocomplete.h" |
+#include "chrome/browser/browser.h" |
#include "chrome/browser/gtk/browser_window_gtk.h" |
#include "chrome/browser/gtk/custom_button.h" |
#include "chrome/browser/gtk/gtk_theme_provider.h" |
@@ -1616,7 +1617,7 @@ bool TabStripGtk::CompleteDrop(guchar* data) { |
// Insert a new tab. |
TabContents* contents = |
model_->delegate()->CreateTabContentsForURL( |
- url, GURL(), model_->profile(), PageTransition::TYPED, false, |
+ url, GURL(), model_->profile(), PageTransition::LINK, false, |
NULL); |
model_->AddTabContents(contents, drop_index, PageTransition::GENERATED, |
TabStripModel::ADD_SELECTED); |
@@ -1974,19 +1975,9 @@ void TabStripGtk::OnNewTabClicked(GtkWidget* widget) { |
if (!gtk_util::URLFromPrimarySelection(model_->profile(), &url)) |
return; |
- TabContents* contents = |
- model_->delegate()->CreateTabContentsForURL( |
- url, |
- GURL(), // referrer |
- model_->profile(), |
- PageTransition::TYPED, |
- false, // defer_load |
- NULL); // instance |
- model_->AddTabContents( |
- contents, |
- -1, // index |
- PageTransition::TYPED, |
- TabStripModel::ADD_SELECTED); |
+ Browser* browser = window_->browser(); |
+ DCHECK(browser); |
+ browser->AddSelectedTabWithURL(url, PageTransition::TYPED); |
break; |
} |
default: |