BrowsingContextContainer.h 866 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/HTML/HTMLElement.h>
  8. namespace Web::HTML {
  9. class BrowsingContextContainer : public HTMLElement {
  10. public:
  11. BrowsingContextContainer(DOM::Document&, QualifiedName);
  12. virtual ~BrowsingContextContainer() override;
  13. BrowsingContext* nested_browsing_context() { return m_nested_browsing_context; }
  14. const BrowsingContext* nested_browsing_context() const { return m_nested_browsing_context; }
  15. const DOM::Document* content_document() const;
  16. Origin content_origin() const;
  17. bool may_access_from_origin(const Origin&) const;
  18. void nested_browsing_context_did_load(Badge<FrameLoader>);
  19. virtual void inserted() override;
  20. protected:
  21. RefPtr<BrowsingContext> m_nested_browsing_context;
  22. };
  23. }