2021-04-03 06:43:08 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-04-03 06:43:08 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
|
2021-05-31 09:59:28 -03:00
|
|
|
class BrowsingContextContainer : public HTMLElement {
|
2021-04-03 06:43:08 -03:00
|
|
|
public:
|
2021-05-31 09:59:28 -03:00
|
|
|
BrowsingContextContainer(DOM::Document&, QualifiedName);
|
|
|
|
|
virtual ~BrowsingContextContainer() override;
|
2021-04-03 06:43:08 -03:00
|
|
|
|
2021-05-30 07:36:53 -03:00
|
|
|
BrowsingContext* nested_browsing_context() { return m_nested_browsing_context; }
|
|
|
|
|
const BrowsingContext* nested_browsing_context() const { return m_nested_browsing_context; }
|
2021-04-03 06:43:08 -03:00
|
|
|
|
|
|
|
|
const DOM::Document* content_document() const;
|
|
|
|
|
|
|
|
|
|
Origin content_origin() const;
|
|
|
|
|
bool may_access_from_origin(const Origin&) const;
|
|
|
|
|
|
2021-05-30 07:36:53 -03:00
|
|
|
void nested_browsing_context_did_load(Badge<FrameLoader>);
|
2021-04-03 06:43:08 -03:00
|
|
|
|
2021-04-06 13:58:20 -03:00
|
|
|
virtual void inserted() override;
|
2021-04-03 11:45:14 -03:00
|
|
|
|
2021-04-03 06:43:08 -03:00
|
|
|
protected:
|
2021-05-30 07:36:53 -03:00
|
|
|
RefPtr<BrowsingContext> m_nested_browsing_context;
|
2021-04-03 06:43:08 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|