diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Storage.h')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Storage.h | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Storage.h b/Userland/Libraries/LibWeb/HTML/Storage.h index c8ad3f99f9..c6dbee2bff 100644 --- a/Userland/Libraries/LibWeb/HTML/Storage.h +++ b/Userland/Libraries/LibWeb/HTML/Storage.h @@ -7,20 +7,16 @@ #pragma once #include <AK/HashMap.h> -#include <AK/RefCounted.h> -#include <LibWeb/Bindings/Wrappable.h> +#include <LibWeb/Bindings/PlatformObject.h> #include <LibWeb/DOM/ExceptionOr.h> -#include <LibWeb/Forward.h> namespace Web::HTML { -class Storage - : public RefCounted<Storage> - , public Bindings::Wrappable { -public: - using WrapperType = Bindings::StorageWrapper; +class Storage : public Bindings::PlatformObject { + WEB_PLATFORM_OBJECT(Storage, Bindings::PlatformObject); - static NonnullRefPtr<Storage> create(); +public: + static JS::NonnullGCPtr<Storage> create(HTML::Window&); ~Storage(); size_t length() const; @@ -37,7 +33,7 @@ public: void dump() const; private: - Storage(); + explicit Storage(HTML::Window&); void reorder(); void broadcast(String const& key, String const& old_value, String const& new_value); @@ -47,8 +43,4 @@ private: } -namespace Web::Bindings { - -StorageWrapper* wrap(JS::Realm&, HTML::Storage&); - -} +WRAPPER_HACK(Storage, Web::HTML) |