summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/WorkerNavigator.h
blob: d111884375ad385b8045e5b20b1321f02f185d1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * Copyright (c) 2022, Andrew Kaster <akaster@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/HTML/NavigatorConcurrentHardware.h>
#include <LibWeb/HTML/NavigatorID.h>
#include <LibWeb/HTML/NavigatorLanguage.h>
#include <LibWeb/HTML/NavigatorOnLine.h>

namespace Web::HTML {

class WorkerNavigator : public Bindings::PlatformObject
    , public NavigatorConcurrentHardwareMixin
    , public NavigatorIDMixin
    , public NavigatorLanguageMixin
    , public NavigatorOnLineMixin {
    WEB_PLATFORM_OBJECT(WorkerNavigator, Bindings::PlatformObject);

public:
    static JS::NonnullGCPtr<WorkerNavigator> create(WorkerGlobalScope&);

    virtual ~WorkerNavigator() override;

private:
    explicit WorkerNavigator(WorkerGlobalScope&);

    virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
};

}