| Index: chrome/browser/views/tabs/tab_strip.cc
|
| diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
|
| index 4b61bb5b98f4c661ea4f5833c5ee0a9353cacba2..3054e0a23851aa857671a0b305d20dc86b81cd84 100644
|
| --- a/chrome/browser/views/tabs/tab_strip.cc
|
| +++ b/chrome/browser/views/tabs/tab_strip.cc
|
| @@ -121,9 +121,6 @@ class NewTabButton : public views::ImageButton {
|
| // static
|
| const int TabStrip::mini_to_non_mini_gap_ = 3;
|
|
|
| -// static
|
| -const int TabStrip::extra_gap_for_nano_ = 10;
|
| -
|
| TabStrip::TabStrip(TabStripController* controller)
|
| : BaseTabStrip(controller, BaseTabStrip::HORIZONTAL_TAB_STRIP),
|
| resize_layout_factory_(this),
|
| @@ -657,11 +654,9 @@ void TabStrip::GetCurrentTabWidths(double* unselected_width,
|
|
|
| void TabStrip::GetDesiredTabWidths(int tab_count,
|
| int mini_tab_count,
|
| - int nano_tab_count,
|
| double* unselected_width,
|
| double* selected_width) const {
|
| DCHECK(tab_count >= 0 && mini_tab_count >= 0 && mini_tab_count <= tab_count);
|
| - DCHECK(nano_tab_count >= 0 && nano_tab_count <= tab_count);
|
| const double min_unselected_width = Tab::GetMinimumUnselectedSize().width();
|
| const double min_selected_width = Tab::GetMinimumSelectedSize().width();
|
|
|
| @@ -700,9 +695,6 @@ void TabStrip::GetDesiredTabWidths(int tab_count,
|
| }
|
| // Account for gap between the last mini-tab and first non-mini-tab.
|
| available_width -= mini_to_non_mini_gap_;
|
| - // And add some extra space if you have nano tabs in the mix.
|
| - if (nano_tab_count > 0)
|
| - available_width -= extra_gap_for_nano_;
|
| }
|
|
|
| // Calculate the desired tab widths by dividing the available space into equal
|
| @@ -763,8 +755,7 @@ void TabStrip::ResizeLayoutTabs() {
|
| }
|
| Tab* first_tab = GetTabAtTabDataIndex(mini_tab_count);
|
| double unselected, selected;
|
| - GetDesiredTabWidths(tab_count(), mini_tab_count, GetNanoTabCount(),
|
| - &unselected, &selected);
|
| + GetDesiredTabWidths(tab_count(), mini_tab_count, &unselected, &selected);
|
| int w = Round(first_tab->IsSelected() ? selected : selected);
|
|
|
| // We only want to run the animation if we're not already at the desired
|
| @@ -969,21 +960,18 @@ TabStrip::DropInfo::~DropInfo() {
|
| void TabStrip::GenerateIdealBounds() {
|
| int non_closing_tab_count = 0;
|
| int mini_tab_count = 0;
|
| - int nano_tab_count = 0;
|
| for (int i = 0; i < tab_count(); ++i) {
|
| BaseTab* tab = base_tab_at_tab_index(i);
|
| if (!tab->closing()) {
|
| ++non_closing_tab_count;
|
| if (tab->data().mini)
|
| mini_tab_count++;
|
| - if (tab->data().app)
|
| - nano_tab_count++;
|
| }
|
| }
|
|
|
| double unselected, selected;
|
| - GetDesiredTabWidths(non_closing_tab_count, mini_tab_count, nano_tab_count,
|
| - &unselected, &selected);
|
| + GetDesiredTabWidths(non_closing_tab_count, mini_tab_count, &unselected,
|
| + &selected);
|
|
|
| current_unselected_width_ = unselected;
|
| current_selected_width_ = selected;
|
| @@ -1003,8 +991,6 @@ void TabStrip::GenerateIdealBounds() {
|
| if (last_was_mini) {
|
| // Give a bigger gap between mini and non-mini tabs.
|
| tab_x += mini_to_non_mini_gap_;
|
| - if (nano_tab_count > 0)
|
| - tab_x += extra_gap_for_nano_;
|
| }
|
| if (tab->IsSelected())
|
| tab_width = selected;
|
| @@ -1118,17 +1104,6 @@ int TabStrip::GetMiniTabCount() const {
|
| return mini_count;
|
| }
|
|
|
| -int TabStrip::GetNanoTabCount() const {
|
| - int nano_count = 0;
|
| - for (int i = 0; i < tab_count(); ++i) {
|
| - if (base_tab_at_tab_index(i)->data().app)
|
| - nano_count++;
|
| - else
|
| - return nano_count;
|
| - }
|
| - return nano_count;
|
| -}
|
| -
|
| int TabStrip::GetAvailableWidthForTabs(Tab* last_tab) const {
|
| return last_tab->x() + last_tab->width();
|
| }
|
|
|