/* * Copyright (c) 2022, Dex♪ * Copyright (c) 2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Ladybird { class ImageCodecPlugin final : public Web::Platform::ImageCodecPlugin { public: explicit ImageCodecPlugin(NonnullRefPtr); virtual ~ImageCodecPlugin() override; virtual NonnullRefPtr> decode_image(ReadonlyBytes, Function(Web::Platform::DecodedImage&)> on_resolved, Function on_rejected) override; void set_client(NonnullRefPtr); private: RefPtr m_client; }; }