mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +00:00
LibWeb: Extract some Internals functionality to a base class
This will just allow re-using these definitions on other internal pages.
This commit is contained in:
parent
2d220a8bbc
commit
9dcbf5562a
Notes:
github-actions[bot]
2025-03-19 14:04:52 +00:00
Author: https://github.com/trflynn89
Commit: 9dcbf5562a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3967
Reviewed-by: https://github.com/shannonbooth
5 changed files with 87 additions and 37 deletions
28
Libraries/LibWeb/Internals/InternalsBase.h
Normal file
28
Libraries/LibWeb/Internals/InternalsBase.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Web::Internals {
|
||||
|
||||
class InternalsBase : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(InternalsBase, Bindings::PlatformObject);
|
||||
GC_DECLARE_ALLOCATOR(InternalsBase);
|
||||
|
||||
public:
|
||||
virtual ~InternalsBase() override;
|
||||
|
||||
protected:
|
||||
explicit InternalsBase(JS::Realm&);
|
||||
|
||||
HTML::Window& window() const;
|
||||
Page& page() const;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue