summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/FrameHostElement.h
blob: 54891becd404def0c9f4748d52ff7252bac88e16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibWeb/HTML/HTMLElement.h>

namespace Web::HTML {

class FrameHostElement : public HTMLElement {
public:
    FrameHostElement(DOM::Document&, QualifiedName);
    virtual ~FrameHostElement() override;

    Frame* content_frame() { return m_content_frame; }
    const Frame* content_frame() const { return m_content_frame; }

    const DOM::Document* content_document() const;

    Origin content_origin() const;
    bool may_access_from_origin(const Origin&) const;

    void content_frame_did_load(Badge<FrameLoader>);

    virtual void inserted() override;

protected:
    RefPtr<Frame> m_content_frame;
};

}