chromium/ui/color/color_provider_utils.cc

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

#include "ui/color/color_provider_utils.h"

#include <memory>
#include <string_view>

#include "base/containers/contains.h"
#include "base/containers/fixed_flat_map.h"
#include "base/no_destructor.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/color/color_provider.h"
#include "ui/color/color_recipe.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"

namespace ui {
namespace {

RendererColorId;

// Below defines the mapping between RendererColorIds and ColorIds.
struct RendererColorIdTable {};
constexpr RendererColorIdTable kRendererColorIdMap[] =;

ColorProviderUtilsCallbacks* g_color_provider_utils_callbacks =;

}  // namespace

ColorProviderUtilsCallbacks::~ColorProviderUtilsCallbacks() = default;

std::string_view ColorModeName(ColorProviderKey::ColorMode color_mode) {}

std::string_view ContrastModeName(
    ColorProviderKey::ContrastMode contrast_mode) {}

std::string_view ForcedColorsName(
    ColorProviderKey::ForcedColors forced_colors) {}

std::string_view SystemThemeName(ui::SystemTheme system_theme) {}

#include "ui/color/color_id_map_macros.inc"

std::string ColorIdName(ColorId color_id) {}

// Note that this second include is not redundant. The second inclusion of the
// .inc file serves to undefine the macros the first inclusion defined.
#include "ui/color/color_id_map_macros.inc"  // NOLINT(build/include)

std::string SkColorName(SkColor color) {}

std::string ConvertColorProviderColorIdToCSSColorId(std::string color_id_name) {}

std::string ConvertSkColorToCSSColor(SkColor color) {}

RendererColorMap CreateRendererColorMap(const ColorProvider& color_provider) {}

std::unique_ptr<ColorProvider> CreateColorProviderFromRendererColorMap(
    const RendererColorMap& renderer_color_map) {}

void AddEmulatedForcedColorsToMixer(ColorMixer& mixer, bool dark_mode) {}

std::unique_ptr<ColorProvider> CreateEmulatedForcedColorsColorProvider(
    bool dark_mode) {}

std::unique_ptr<ColorProvider>
CreateEmulatedForcedColorsColorProviderForTest() {}

std::unique_ptr<ColorProvider> COMPONENT_EXPORT(COLOR)
    CreateDefaultColorProviderForBlink(bool dark_mode) {}

void CompleteScrollbarColorsDefinition(ui::ColorMixer& mixer) {}

void CompleteControlsForcedColorsDefinition(ui::ColorMixer& mixer) {}

void CompleteDefaultCssSystemColorDefinition(ui::ColorMixer& mixer,
                                             bool dark_mode) {}

void COMPONENT_EXPORT(COLOR)
    CompleteDefaultNonWebNativeRendererColorIdsDefinition(
        ui::ColorMixer& mixer) {}

RendererColorMap COMPONENT_EXPORT(COLOR)
    GetDefaultBlinkColorProviderColorMaps(bool dark_mode,
                                          bool is_forced_colors) {}

bool IsRendererColorMappingEquivalent(
    const ColorProvider* color_provider,
    const RendererColorMap& renderer_color_map) {}

void SetColorProviderUtilsCallbacks(ColorProviderUtilsCallbacks* callbacks) {}

}  // namespace ui