diff options
author | Luke Wilde <lukew@serenityos.org> | 2023-02-28 00:23:53 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-02-28 12:36:14 +0100 |
commit | 4d0277cd9a338d8fe29db8521ce0e632cae1ae1d (patch) | |
tree | c4d4515cea3e17eb2c5d3c6d1e3f3cdba8f92042 /Userland/Libraries/LibWeb/HTML/Navigator.h | |
parent | 5e422bdae03f1287e5ea3d7af80794e8aa25c919 (diff) | |
download | serenity-4d0277cd9a338d8fe29db8521ce0e632cae1ae1d.zip |
LibWeb: Implement navigator.{plugins,mimeTypes}
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Navigator.h')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/Navigator.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Navigator.h b/Userland/Libraries/LibWeb/HTML/Navigator.h index 9d6123e5ff..0bb2332cf6 100644 --- a/Userland/Libraries/LibWeb/HTML/Navigator.h +++ b/Userland/Libraries/LibWeb/HTML/Navigator.h @@ -7,10 +7,12 @@ #pragma once #include <LibWeb/Bindings/PlatformObject.h> +#include <LibWeb/HTML/MimeTypeArray.h> #include <LibWeb/HTML/NavigatorConcurrentHardware.h> #include <LibWeb/HTML/NavigatorID.h> #include <LibWeb/HTML/NavigatorLanguage.h> #include <LibWeb/HTML/NavigatorOnLine.h> +#include <LibWeb/HTML/PluginArray.h> namespace Web::HTML { @@ -35,17 +37,25 @@ public: // https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-javaenabled bool java_enabled() const { return false; } - // https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-pdfviewerenabled bool pdf_viewer_enabled() const; bool webdriver() const; + JS::ThrowCompletionOr<JS::NonnullGCPtr<MimeTypeArray>> mime_types(); + JS::ThrowCompletionOr<JS::NonnullGCPtr<PluginArray>> plugins(); + virtual ~Navigator() override; +protected: + virtual void visit_edges(Cell::Visitor&) override; + private: explicit Navigator(JS::Realm&); virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override; + + JS::GCPtr<PluginArray> m_plugin_array; + JS::GCPtr<MimeTypeArray> m_mime_type_array; }; } |