1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 11:05:08 +00:00
serenity/Userland/Libraries/LibWeb/Loader/FrameLoader.h
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00

46 lines
946 B
C++

/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Forward.h>
#include <LibWeb/Forward.h>
#include <LibWeb/Loader/Resource.h>
namespace Web {
class FrameLoader final
: public ResourceClient {
public:
enum class Type {
Navigation,
Reload,
IFrame,
};
explicit FrameLoader(Frame&);
~FrameLoader();
bool load(const URL&, Type);
bool load(const LoadRequest&, Type);
void load_html(const StringView&, const URL&);
Frame& frame() { return m_frame; }
const Frame& frame() const { return m_frame; }
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);
bool parse_document(DOM::Document&, const ByteBuffer& data);
Frame& m_frame;
};
}