mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibWeb: Implement WorkerNavigator.mediaCapabilities
This commit is contained in:
parent
f08946bcd2
commit
936ca720b4
Notes:
github-actions[bot]
2024-09-05 13:53:24 +00:00
Author: https://github.com/jamierocks
Commit: 936ca720b4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1283
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 27 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Andrew Kaster <akaster@serenityos.org>
|
||||
* Copyright (c) 2024, Jamie Mansfield <jmansfield@cadixdev.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -11,6 +12,7 @@
|
|||
#include <LibWeb/HTML/NavigatorID.h>
|
||||
#include <LibWeb/HTML/NavigatorLanguage.h>
|
||||
#include <LibWeb/HTML/NavigatorOnLine.h>
|
||||
#include <LibWeb/MediaCapabilitiesAPI/MediaCapabilities.h>
|
||||
#include <LibWeb/StorageAPI/NavigatorStorage.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
@ -29,13 +31,19 @@ public:
|
|||
|
||||
virtual ~WorkerNavigator() override;
|
||||
|
||||
JS::NonnullGCPtr<MediaCapabilitiesAPI::MediaCapabilities> media_capabilities();
|
||||
|
||||
private:
|
||||
explicit WorkerNavigator(WorkerGlobalScope&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
// ^StorageAPI::NavigatorStorage
|
||||
virtual Bindings::PlatformObject const& this_navigator_storage_object() const override { return *this; }
|
||||
|
||||
// https://w3c.github.io/media-capabilities/#dom-workernavigator-mediacapabilities
|
||||
JS::GCPtr<MediaCapabilitiesAPI::MediaCapabilities> m_media_capabilities;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue