| Index: chrome/browser/ui/views/tabs/tab_drag_controller.cc
|
| diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
|
| index 87b6ccff79c676afa757e0706c2b2402a5d14a88..207b90fd23379bb707b9065471d1e911708b10c6 100644
|
| --- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
|
| +++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
|
| @@ -616,7 +616,7 @@ TabDragController::DragBrowserToNewTabStrip(
|
|
|
| void TabDragController::DragActiveTabStacked(
|
| const gfx::Point& point_in_screen) {
|
| - if (attached_tabstrip_->tab_count() !=
|
| + if (attached_tabstrip_->GetTabCount() !=
|
| static_cast<int>(initial_tab_positions_.size()))
|
| return; // TODO: should cancel drag if this happens.
|
|
|
| @@ -627,7 +627,7 @@ void TabDragController::DragActiveTabStacked(
|
| void TabDragController::MoveAttachedToNextStackedIndex(
|
| const gfx::Point& point_in_screen) {
|
| int index = attached_tabstrip_->touch_layout_->active_index();
|
| - if (index + 1 >= attached_tabstrip_->tab_count())
|
| + if (index + 1 >= attached_tabstrip_->GetTabCount())
|
| return;
|
|
|
| GetModel(attached_tabstrip_)->MoveSelectedTabsTo(index + 1);
|
| @@ -1099,7 +1099,7 @@ void TabDragController::RunMoveLoop(const gfx::Vector2d& drag_offset) {
|
|
|
| int TabDragController::GetInsertionIndexFrom(const gfx::Rect& dragged_bounds,
|
| int start) const {
|
| - const int last_tab = attached_tabstrip_->tab_count() - 1;
|
| + const int last_tab = attached_tabstrip_->GetTabCount() - 1;
|
| // Make the actual "drag insertion point" be just after the leading edge of
|
| // the first dragged tab. This is closer to where the user thinks of the tab
|
| // as "starting" than just dragged_bounds.x(), especially with narrow tabs.
|
| @@ -1125,7 +1125,7 @@ int TabDragController::GetInsertionIndexFromReversed(
|
| // the first dragged tab. This is closer to where the user thinks of the tab
|
| // as "starting" than just dragged_bounds.x(), especially with narrow tabs.
|
| const int dragged_x = dragged_bounds.x() + Tab::leading_width_for_drag();
|
| - if (start < 0 || start >= attached_tabstrip_->tab_count() ||
|
| + if (start < 0 || start >= attached_tabstrip_->GetTabCount() ||
|
| dragged_x >= attached_tabstrip_->ideal_bounds(start).right())
|
| return -1;
|
|
|
| @@ -1141,7 +1141,7 @@ int TabDragController::GetInsertionIndexFromReversed(
|
| int TabDragController::GetInsertionIndexForDraggedBounds(
|
| const gfx::Rect& dragged_bounds) const {
|
| // If the strip has no tabs, the only position to insert at is 0.
|
| - const int tab_count = attached_tabstrip_->tab_count();
|
| + const int tab_count = attached_tabstrip_->GetTabCount();
|
| if (!tab_count)
|
| return 0;
|
|
|
| @@ -1186,7 +1186,7 @@ int TabDragController::GetInsertionIndexForDraggedBounds(
|
| bool TabDragController::ShouldDragToNextStackedTab(
|
| const gfx::Rect& dragged_bounds,
|
| int index) const {
|
| - if (index + 1 >= attached_tabstrip_->tab_count() ||
|
| + if (index + 1 >= attached_tabstrip_->GetTabCount() ||
|
| !attached_tabstrip_->touch_layout_->IsStacked(index + 1) ||
|
| (mouse_move_direction_ & kMovedMouseRight) == 0)
|
| return false;
|
| @@ -1233,7 +1233,7 @@ int TabDragController::GetInsertionIndexForDraggedBoundsStacked(
|
| // tab is stacked, then shorten the distance used to determine insertion
|
| // bounds. We do this as GetInsertionIndexFrom() uses the bounds of the
|
| // tabs. When tabs are stacked the next/previous tab is on top of the tab.
|
| - if (active_index + 1 < attached_tabstrip_->tab_count() &&
|
| + if (active_index + 1 < attached_tabstrip_->GetTabCount() &&
|
| touch_layout->IsStacked(active_index + 1)) {
|
| index = GetInsertionIndexFrom(dragged_bounds, active_index + 1);
|
| if (index == -1 && ShouldDragToNextStackedTab(dragged_bounds, active_index))
|
|
|