summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tabs
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/gtk/tabs')
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc18
-rw-r--r--chrome/browser/gtk/tabs/tab_strip_gtk.cc7
2 files changed, 10 insertions, 15 deletions
diff --git a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
index 70ecdb8..5ba1d37 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -394,10 +394,8 @@ void DraggedTabControllerGtk::Attach(TabStripGtk* attached_tabstrip,
// changing due to animation).
gfx::Rect bounds = GetDraggedTabTabStripBounds(screen_point);
int index = GetInsertionIndexForDraggedBounds(bounds, false);
- attached_tabstrip_->model()->InsertTabContentsAt(
- index, dragged_contents_,
- TabStripModel::ADD_SELECTED |
- (pinned_ ? TabStripModel::ADD_PINNED : 0));
+ attached_tabstrip_->model()->InsertTabContentsAt(index, dragged_contents_,
+ true, false, pinned_);
tab = GetTabMatchingDraggedContents(attached_tabstrip_);
}
@@ -618,10 +616,8 @@ void DraggedTabControllerGtk::RevertDrag() {
// TODO(beng): (Cleanup) seems like we should use Attach() for this
// somehow.
attached_tabstrip_ = source_tabstrip_;
- source_tabstrip_->model()->InsertTabContentsAt(
- source_model_index_, dragged_contents_,
- TabStripModel::ADD_SELECTED |
- (pinned_ ? TabStripModel::ADD_PINNED : 0));
+ source_tabstrip_->model()->InsertTabContentsAt(source_model_index_,
+ dragged_contents_, true, false, pinned_);
} else {
// The tab was moved within the tabstrip where the drag was initiated.
// Move it back to the starting location.
@@ -635,10 +631,8 @@ void DraggedTabControllerGtk::RevertDrag() {
// The tab was detached from the tabstrip where the drag began, and has not
// been attached to any other tabstrip. We need to put it back into the
// source tabstrip.
- source_tabstrip_->model()->InsertTabContentsAt(
- source_model_index_, dragged_contents_,
- TabStripModel::ADD_SELECTED |
- (pinned_ ? TabStripModel::ADD_PINNED : 0));
+ source_tabstrip_->model()->InsertTabContentsAt(source_model_index_,
+ dragged_contents_, true, false, pinned_);
}
// If we're not attached to any tab strip, or attached to some other tab
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
index 0a86cb8..a05105a 100644
--- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
@@ -1611,8 +1611,8 @@ bool TabStripGtk::CompleteDrop(guchar* data) {
model_->delegate()->CreateTabContentsForURL(
url, GURL(), model_->profile(), PageTransition::TYPED, false,
NULL);
- model_->AddTabContents(contents, drop_index, PageTransition::GENERATED,
- TabStripModel::ADD_SELECTED);
+ model_->AddTabContents(contents, drop_index, false,
+ PageTransition::GENERATED, true);
} else {
model_->GetTabContentsAt(drop_index)->controller().LoadURL(
url, GURL(), PageTransition::GENERATED);
@@ -1982,8 +1982,9 @@ void TabStripGtk::OnNewTabClicked(GtkWidget* widget) {
model_->AddTabContents(
contents,
-1, // index
+ false, // force_index
PageTransition::TYPED,
- TabStripModel::ADD_SELECTED);
+ true); // foreground
break;
}
default: