diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-27 13:53:31 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-09-06 00:27:09 +0200 |
commit | f6c61940f6569d095a028f73bc8a1b00702275ec (patch) | |
tree | 0e613105d2defe4d4bc698ed720c149b1f609ec1 /Userland/Libraries/LibWeb/Bindings/Wrapper.h | |
parent | 71c7ac35101579e0b584e83b0c6be723a857b3c4 (diff) | |
download | serenity-f6c61940f6569d095a028f73bc8a1b00702275ec.zip |
LibWeb: Add PlatformObject class
This represents the "platform object" concept from the IDL spec, which
refers to an object that implements an IDL interface.
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings/Wrapper.h')
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/Wrapper.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/Wrapper.h b/Userland/Libraries/LibWeb/Bindings/Wrapper.h index 2ac7c4851c..86b39899c9 100644 --- a/Userland/Libraries/LibWeb/Bindings/Wrapper.h +++ b/Userland/Libraries/LibWeb/Bindings/Wrapper.h @@ -1,29 +1,27 @@ /* - * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2020-2022, Andreas Kling <kling@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once -#include <AK/NonnullRefPtr.h> #include <AK/Weakable.h> -#include <LibJS/Runtime/Object.h> +#include <LibWeb/Bindings/PlatformObject.h> #include <LibWeb/Forward.h> namespace Web::Bindings { class Wrapper - : public JS::Object + : public PlatformObject , public Weakable<Wrapper> { - JS_OBJECT(Wrapper, JS::Object); + JS_OBJECT(Wrapper, PlatformObject); public: + virtual ~Wrapper() override; + protected: - explicit Wrapper(Object& prototype) - : Object(prototype) - { - } + explicit Wrapper(Object& prototype); }; } |