mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb+WebContent: Convert ImageCodecPlugin to use the promise-based API
This commit is contained in:
parent
b871bc082c
commit
39dfb659cf
Notes:
sideshowbarker
2024-07-17 08:59:18 +09:00
Author: https://github.com/ADKaster
Commit: 39dfb659cf
Pull-request: https://github.com/SerenityOS/serenity/pull/24028
Reviewed-by: https://github.com/LucasChollet
Reviewed-by: https://github.com/awesomekling
6 changed files with 60 additions and 27 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/Promise.h>
|
||||
#include <LibGfx/Forward.h>
|
||||
|
||||
namespace Web::Platform {
|
||||
|
@ -31,7 +32,8 @@ public:
|
|||
|
||||
virtual ~ImageCodecPlugin();
|
||||
|
||||
virtual Optional<DecodedImage> decode_image(ReadonlyBytes) = 0;
|
||||
virtual NonnullRefPtr<Core::Promise<DecodedImage>> decode_image(ReadonlyBytes, Function<ErrorOr<void>(DecodedImage&)> on_resolved, Function<void(Error&)> on_rejected) = 0;
|
||||
Optional<DecodedImage> decode_image(ReadonlyBytes);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue