chromium/chrome/browser/shortcuts/shortcut_icon_generator.cc

// Copyright 2018 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/shortcuts/shortcut_icon_generator.h"

#include <string>

#include "base/i18n/case_conversion.h"
#include "base/strings/utf_string_conversion_utils.h"
#include "build/build_config.h"
#include "cc/paint/paint_flags.h"
#include "chrome/grit/platform_locale_settings.h"
#include "components/url_formatter/url_formatter.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/font.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/image/canvas_image_source.h"

namespace shortcuts {

namespace {

// Generates a square container icon of |output_size| by drawing the given
// |icon_letter| into a rounded background of |color|.
class GeneratedIconImageSource : public gfx::CanvasImageSource {};

// Gets the first code point of a string.
char32_t FirstCodepoint(const std::u16string& str) {}

}  // namespace

SkBitmap GenerateBitmap(SquareSizePx output_size, char32_t icon_letter) {}

char32_t GenerateIconLetterFromUrl(const GURL& app_url) {}

char32_t GenerateIconLetterFromName(const std::u16string& app_name) {}

std::u16string IconLetterToString(char32_t cp) {}

}  // namespace shortcuts