chromium/services/media_session/public/cpp/media_image_manager.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 "services/media_session/public/cpp/media_image_manager.h"

#include <algorithm>

#include "base/containers/span.h"
#include "base/hash/hash.h"
#include "base/strings/string_util.h"
#include "ui/gfx/geometry/size.h"

namespace media_session {

namespace {

// The default score of unknown image size.
const double kDefaultImageSizeScore =;

// The scores for different image types. Keep them sorted by value.
const double kDefaultTypeScore =;
const double kPNGTypeScore =;
const double kJPEGTypeScore =;
const double kBMPTypeScore =;
const double kXIconTypeScore =;
const double kGIFTypeScore =;

double GetImageAspectRatioScore(const gfx::Size& size) {}

std::string GetExtension(const std::string& path) {}

double GetImageDominantSizeScore(int min_size,
                                 int ideal_size,
                                 const gfx::Size& size) {}

}  // namespace

// static
double MediaImageManager::GetImageSizeScore(int min_size,
                                            int ideal_size,
                                            const gfx::Size& size) {}

MediaImageManager::MediaImageManager(int min_size, int ideal_size)
    :{}

MediaImageManager::~MediaImageManager() = default;

std::optional<MediaImage> MediaImageManager::SelectImage(
    const std::vector<MediaImage>& images) {}

double MediaImageManager::GetImageScore(const MediaImage& image) const {}

// static
std::optional<double> MediaImageManager::GetImageExtensionScore(
    const GURL& url) {}

// static
std::optional<double> MediaImageManager::GetImageTypeScore(
    const std::u16string& type) {}

}  // namespace media_session