1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

LibWeb: Add type for FrameLoader::load

This should enable to destinguish between IFrame, Reload and Navigation
motivated loads in order to call the appropriate hooks.

This change is motivated as loading the IFrame test page causes the
IFrame url to be added to the history and shows up as the current
browser location bar.
This commit is contained in:
Kevin Meyer 2020-07-07 17:25:33 +02:00 committed by Andreas Kling
parent 6105f063cb
commit a5b8cc2d0b
7 changed files with 19 additions and 11 deletions

View file

@ -35,10 +35,16 @@ namespace Web {
class FrameLoader final
: public ResourceClient {
public:
enum class Type {
Navigation,
Reload,
IFrame,
};
explicit FrameLoader(Frame&);
~FrameLoader();
bool load(const URL&);
bool load(const URL&, Type);
Frame& frame() { return m_frame; }
const Frame& frame() const { return m_frame; }