LibHTML: Add ResourceLoader to support protocol-agnostic URL loading

We now support loading both file:// and http:// URLs. Feel free to
visit http://www.serenityos.org/ and enjoy the fancy good times. :^)
This commit is contained in:
Andreas Kling 2019-10-08 19:37:15 +02:00
parent 3fdc595e0c
commit 3be6d1aff0
Notes: sideshowbarker 2024-07-19 11:45:12 +09:00
6 changed files with 89 additions and 18 deletions

View file

@ -0,0 +1,14 @@
#pragma once
#include <AK/Function.h>
#include <AK/URL.h>
class ResourceLoader {
public:
static ResourceLoader& the();
void load(const URL&, Function<void(const ByteBuffer&)>);
private:
ResourceLoader() {}
};