chromium/chrome/browser/ui/views/tabs/tab_strip_layout.cc

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/views/tabs/tab_strip_layout.h"

#include <stddef.h>

#include <algorithm>

#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/tabs/tab_style.h"
#include "ui/gfx/animation/tween.h"
#include "ui/gfx/geometry/rect.h"

namespace {

// Solve layout constraints to determine how much space is available for tabs
// to use relative to how much they want to use.
TabSizer CalculateSpaceFractionAvailable(
    const TabLayoutConstants& layout_constants,
    const std::vector<TabWidthConstraints>& tabs,
    std::optional<int> width) {}

}  // namespace

TabSizer::TabSizer(LayoutDomain domain, float space_fraction_available)
    :{}

int TabSizer::CalculateTabWidth(const TabWidthConstraints& tab) const {}

bool TabSizer::TabAcceptsExtraSpace(const TabWidthConstraints& tab) const {}

bool TabSizer::IsAlreadyPreferredWidth() const {}

// Because TabSizer::CalculateTabWidth() rounds down, the fractional part of tab
// widths go unused.  Retroactively round up tab widths from left to right to
// use up that width.
void AllocateExtraSpace(std::vector<gfx::Rect>* bounds,
                        const std::vector<TabWidthConstraints>& tabs,
                        std::optional<int> extra_space,
                        TabSizer tab_sizer) {}

std::vector<gfx::Rect> CalculateTabBounds(
    const TabLayoutConstants& layout_constants,
    const std::vector<TabWidthConstraints>& tabs,
    std::optional<int> width) {}