
This makes it consistent with how http:// callbacks are fired. It would probably be fine to have file:// be synchronous, but at the same time it's nice to have consistency.
16 lines
300 B
C++
16 lines
300 B
C++
#pragma once
|
|
|
|
#include <AK/Function.h>
|
|
#include <AK/URL.h>
|
|
#include <LibCore/CObject.h>
|
|
|
|
class ResourceLoader : public CObject {
|
|
C_OBJECT(ResourceLoader)
|
|
public:
|
|
static ResourceLoader& the();
|
|
|
|
void load(const URL&, Function<void(const ByteBuffer&)>);
|
|
|
|
private:
|
|
ResourceLoader() {}
|
|
};
|