/src/serenity/Userland/Libraries/LibWeb/NavigationTiming/PerformanceNavigation.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2024, Colin Reeder <colin@vpzom.click> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #include <LibWeb/Bindings/Intrinsics.h> |
8 | | #include <LibWeb/Bindings/PerformanceNavigationPrototype.h> |
9 | | #include <LibWeb/NavigationTiming/PerformanceNavigation.h> |
10 | | |
11 | | namespace Web::NavigationTiming { |
12 | | |
13 | | JS_DEFINE_ALLOCATOR(PerformanceNavigation); |
14 | | |
15 | | PerformanceNavigation::PerformanceNavigation(JS::Realm& realm, u16 type, u16 redirect_count) |
16 | 0 | : PlatformObject(realm) |
17 | 0 | , m_type(type) |
18 | 0 | , m_redirect_count(redirect_count) |
19 | 0 | { |
20 | 0 | } |
21 | 0 | PerformanceNavigation::~PerformanceNavigation() = default; |
22 | | |
23 | | void PerformanceNavigation::initialize(JS::Realm& realm) |
24 | 0 | { |
25 | 0 | Base::initialize(realm); |
26 | 0 | WEB_SET_PROTOTYPE_FOR_INTERFACE(PerformanceNavigation); |
27 | 0 | } |
28 | | |
29 | | u16 PerformanceNavigation::type() const |
30 | 0 | { |
31 | 0 | return m_type; |
32 | 0 | } |
33 | | |
34 | | u16 PerformanceNavigation::redirect_count() const |
35 | 0 | { |
36 | 0 | return m_redirect_count; |
37 | 0 | } |
38 | | |
39 | | } |