2021-01-18 15:06:13 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-01-18 15:06:13 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/NavigationTiming/PerformanceTiming.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::NavigationTiming {
|
|
|
|
|
|
2022-03-07 23:08:26 +01:00
|
|
|
PerformanceTiming::PerformanceTiming(HTML::Window& window)
|
2022-08-31 19:12:11 +02:00
|
|
|
: PlatformObject(window.realm())
|
|
|
|
|
, m_window(window)
|
2021-01-18 15:06:13 +01:00
|
|
|
{
|
LibWeb: Remove unecessary dependence on Window from assorted classes
These classes only needed Window to get at its realm. Pass a realm
directly to construct Crypto, Encoding, HRT, IntersectionObserver,
NavigationTiming, Page, RequestIdleCallback, Selection, Streams, URL,
and XML classes.
2022-09-25 18:11:21 -06:00
|
|
|
set_prototype(&Bindings::cached_web_prototype(realm(), "PerformanceTiming"));
|
2021-01-18 15:06:13 +01:00
|
|
|
}
|
|
|
|
|
|
2022-03-14 13:21:51 -06:00
|
|
|
PerformanceTiming::~PerformanceTiming() = default;
|
2021-01-18 15:06:13 +01:00
|
|
|
|
2022-08-31 19:12:11 +02:00
|
|
|
void PerformanceTiming::visit_edges(Cell::Visitor& visitor)
|
|
|
|
|
{
|
|
|
|
|
Base::visit_edges(visitor);
|
|
|
|
|
visitor.visit(m_window.ptr());
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-18 15:06:13 +01:00
|
|
|
}
|