Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3014)

Unified Diff: chrome/browser/gtk/tabs/tab_strip_gtk.cc

Issue 4655002: Don't show tabbed options page in OTR browser window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pkasting nits Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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:

Powered by Google App Engine
This is Rietveld 408576698