chromium/chrome/browser/ui/thumbnails/thumbnail_image.cc

// Copyright 2019 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/ui/thumbnails/thumbnail_image.h"

#include <utility>

#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/codec/jpeg_codec.h"
#include "ui/gfx/geometry/skia_conversions.h"

ThumbnailImage::Subscription::Subscription(
    scoped_refptr<ThumbnailImage> thumbnail)
    :{}

ThumbnailImage::Subscription::~Subscription() {}

ThumbnailImage::CaptureReadiness ThumbnailImage::Delegate::GetCaptureReadiness()
    const {}

ThumbnailImage::Delegate::~Delegate() {}

ThumbnailImage::ThumbnailImage(Delegate* delegate, CompressedThumbnailData data)
    :{}

ThumbnailImage::~ThumbnailImage() {}

ThumbnailImage::CaptureReadiness ThumbnailImage::GetCaptureReadiness() const {}

std::unique_ptr<ThumbnailImage::Subscription> ThumbnailImage::Subscribe() {}

void ThumbnailImage::AssignSkBitmap(SkBitmap bitmap,
                                    std::optional<uint64_t> frame_id) {}

void ThumbnailImage::ClearData() {}

void ThumbnailImage::RequestThumbnailImage() {}

void ThumbnailImage::RequestCompressedThumbnailData() {}

size_t ThumbnailImage::GetCompressedDataSizeInBytes() const {}

void ThumbnailImage::AssignJPEGData(base::Token thumbnail_id,
                                    base::TimeTicks assign_sk_bitmap_time,
                                    std::optional<uint64_t> frame_id_for_trace,
                                    std::vector<uint8_t> data) {}

bool ThumbnailImage::ConvertJPEGDataToImageSkiaAndNotifyObservers() {}

void ThumbnailImage::NotifyUncompressedDataObservers(base::Token thumbnail_id,
                                                     gfx::ImageSkia image) {}

void ThumbnailImage::NotifyCompressedDataObservers(
    CompressedThumbnailData data) {}

// static
std::vector<uint8_t> ThumbnailImage::CompressBitmap(
    SkBitmap bitmap,
    std::optional<uint64_t> frame_id) {}

// static
gfx::ImageSkia ThumbnailImage::UncompressImage(
    CompressedThumbnailData compressed) {}

// static
gfx::ImageSkia ThumbnailImage::CropPreviewImage(
    const gfx::ImageSkia& source_image,
    const gfx::Size& minimum_size) {}

void ThumbnailImage::HandleSubscriptionDestroyed(Subscription* subscription) {}