2021-01-18 11:06:13 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-01-18 11:06:13 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/NavigationTiming/PerformanceTiming.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::NavigationTiming {
|
|
|
|
|
|
2022-03-07 19:08:26 -03:00
|
|
|
PerformanceTiming::PerformanceTiming(HTML::Window& window)
|
2022-08-31 14:12:11 -03:00
|
|
|
: PlatformObject(window.realm())
|
|
|
|
|
, m_window(window)
|
2021-01-18 11:06:13 -03: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 21:11:21 -03:00
|
|
|
set_prototype(&Bindings::cached_web_prototype(realm(), "PerformanceTiming"));
|
2021-01-18 11:06:13 -03:00
|
|
|
}
|
|
|
|
|
|
2022-03-14 16:21:51 -03:00
|
|
|
PerformanceTiming::~PerformanceTiming() = default;
|
2021-01-18 11:06:13 -03:00
|
|
|
|
2022-08-31 14:12:11 -03:00
|
|
|
void PerformanceTiming::visit_edges(Cell::Visitor& visitor)
|
|
|
|
|
{
|
|
|
|
|
Base::visit_edges(visitor);
|
|
|
|
|
visitor.visit(m_window.ptr());
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-18 11:06:13 -03:00
|
|
|
}
|