#include "third_party/blink/renderer/modules/content_index/content_index_icon_loader.h"
#include "base/barrier_closure.h"
#include "base/time/time.h"
#include "third_party/blink/public/common/manifest/manifest.h"
#include "third_party/blink/public/common/manifest/manifest_icon_selector.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/public/platform/web_icon_sizes_parser.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/loader/threaded_icon_loader.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_request.h"
namespace blink {
namespace {
constexpr base::TimeDelta kIconFetchTimeout = …;
void FetchIcon(ExecutionContext* execution_context,
const KURL& icon_url,
const gfx::Size& icon_size,
ThreadedIconLoader* threaded_icon_loader,
ThreadedIconLoader::IconCallback callback) { … }
WebVector<Manifest::ImageResource> ToImageResource(
ExecutionContext* execution_context,
const Vector<mojom::blink::ContentIconDefinitionPtr>& icon_definitions) { … }
KURL FindBestIcon(WebVector<Manifest::ImageResource> image_resources,
const gfx::Size& icon_size) { … }
}
ContentIndexIconLoader::ContentIndexIconLoader() = default;
void ContentIndexIconLoader::Start(
ExecutionContext* execution_context,
mojom::blink::ContentDescriptionPtr description,
const Vector<gfx::Size>& icon_sizes,
IconsCallback callback) { … }
void ContentIndexIconLoader::DidGetIcons(
mojom::blink::ContentDescriptionPtr description,
std::unique_ptr<Vector<SkBitmap>> icons,
IconsCallback callback) { … }
}