#include "ui/views/background.h"
#include <optional>
#include <utility>
#include "base/check.h"
#include "build/build_config.h"
#include "cc/paint/paint_flags.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/rounded_corners_f.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/views/painter.h"
#include "ui/views/view.h"
#if BUILDFLAG(IS_WIN)
#include "skia/ext/skia_utils_win.h"
#endif
namespace views {
class SolidBackground : public Background { … };
class BaseRoundedRectBackground : public Background { … };
class RoundedRectBackground : public BaseRoundedRectBackground { … };
class ThemedVectorIconBackground : public Background { … };
class ThemedSolidBackground : public SolidBackground { … };
class ThemedRoundedRectBackground : public BaseRoundedRectBackground { … };
class BackgroundPainter : public Background { … };
Background::Background() = default;
Background::~Background() = default;
void Background::SetNativeControlColor(SkColor color) { … }
void Background::OnViewThemeChanged(View* view) { … }
std::optional<gfx::RoundedCornersF> Background::GetRoundedCornerRadii() const { … }
std::unique_ptr<Background> CreateSolidBackground(SkColor color) { … }
std::unique_ptr<Background> CreateRoundedRectBackground(
SkColor color,
float radius,
int for_border_thickness) { … }
std::unique_ptr<Background> CreateRoundedRectBackground(
SkColor color,
const gfx::RoundedCornersF& radii,
int for_border_thickness) { … }
std::unique_ptr<Background> CreateThemedRoundedRectBackground(
ui::ColorId color_id,
float radius,
int for_border_thickness) { … }
std::unique_ptr<Background> CreateThemedRoundedRectBackground(
ui::ColorId color_id,
float top_radius,
float bottom_radius,
int for_border_thickness) { … }
std::unique_ptr<Background> CreateThemedRoundedRectBackground(
ui::ColorId color_id,
const gfx::RoundedCornersF& radii,
int for_border_thickness) { … }
std::unique_ptr<Background> CreateThemedVectorIconBackground(
const ui::ThemedVectorIcon& icon) { … }
std::unique_ptr<Background> CreateThemedSolidBackground(ui::ColorId color_id) { … }
std::unique_ptr<Background> CreateBackgroundFromPainter(
std::unique_ptr<Painter> painter) { … }
}