1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

LibWeb: Turn FrameLoader into a ResourceClient

We now use the new resource-based loader for the main resource in each
Frame. This gives us access to caching and sharing. :^)
This commit is contained in:
Andreas Kling 2020-06-06 13:38:08 +02:00
parent 52fcaae71c
commit de6028dfa7
3 changed files with 58 additions and 43 deletions

View file

@ -28,10 +28,12 @@
#include <AK/Forward.h>
#include <LibWeb/Forward.h>
#include <LibWeb/Loader/Resource.h>
namespace Web {
class FrameLoader {
class FrameLoader final
: public ResourceClient {
public:
explicit FrameLoader(Frame&);
~FrameLoader();
@ -44,6 +46,10 @@ public:
void set_use_old_parser(bool b) { m_use_old_parser = b; }
private:
// ^ResourceClient
virtual void resource_did_load() override;
virtual void resource_did_fail() override;
void load_error_page(const URL& failed_url, const String& error_message);
RefPtr<Document> create_document_from_mime_type(const ByteBuffer&, const URL&, const String& mime_type, const String& encoding);