mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-19 16:51:52 +00:00
LibWebView+Services+UI: Move the Web plugins to LibWebView
This commit is contained in:
parent
9e1f001ffe
commit
a14937c45e
Notes:
github-actions[bot]
2024-11-11 12:36:47 +00:00
Author: https://github.com/trflynn89
Commit: a14937c45e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2269
9 changed files with 22 additions and 34 deletions
28
Libraries/LibWebView/Plugins/ImageCodecPlugin.h
Normal file
28
Libraries/LibWebView/Plugins/ImageCodecPlugin.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Dex♪ <dexes.ttp@gmail.com>
|
||||
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibImageDecoderClient/Client.h>
|
||||
#include <LibWeb/Platform/ImageCodecPlugin.h>
|
||||
|
||||
namespace WebView {
|
||||
|
||||
class ImageCodecPlugin final : public Web::Platform::ImageCodecPlugin {
|
||||
public:
|
||||
explicit ImageCodecPlugin(NonnullRefPtr<ImageDecoderClient::Client>);
|
||||
virtual ~ImageCodecPlugin() override;
|
||||
|
||||
virtual NonnullRefPtr<Core::Promise<Web::Platform::DecodedImage>> decode_image(ReadonlyBytes, Function<ErrorOr<void>(Web::Platform::DecodedImage&)> on_resolved, Function<void(Error&)> on_rejected) override;
|
||||
|
||||
void set_client(NonnullRefPtr<ImageDecoderClient::Client>);
|
||||
|
||||
private:
|
||||
RefPtr<ImageDecoderClient::Client> m_client;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue