1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00
serenity/Userland/Libraries/LibWeb/NavigationTiming/PerformanceTiming.h
Andreas Kling 6f433c8656 LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated
This is a monster patch that turns all EventTargets into GC-allocated
PlatformObjects. Their C++ wrapper classes are removed, and the LibJS
garbage collector is now responsible for their lifetimes.

There's a fair amount of hacks and band-aids in this patch, and we'll
have a lot of cleanup to do after this.
2022-09-06 00:27:09 +02:00

52 lines
1.5 KiB
C++

/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/RefCountForwarder.h>
#include <AK/StdLibExtras.h>
#include <LibWeb/Bindings/Wrappable.h>
#include <LibWeb/HTML/Window.h>
namespace Web::NavigationTiming {
class PerformanceTiming final
: public RefCounted<PerformanceTiming>
, public Bindings::Wrappable {
public:
using WrapperType = Bindings::PerformanceTimingWrapper;
using AllowOwnPtr = TrueType;
explicit PerformanceTiming(HTML::Window&);
~PerformanceTiming();
u64 navigation_start() { return 0; }
u64 unload_event_start() { return 0; }
u64 unload_event_end() { return 0; }
u64 redirect_start() { return 0; }
u64 redirect_end() { return 0; }
u64 fetch_start() { return 0; }
u64 domain_lookup_start() { return 0; }
u64 domain_lookup_end() { return 0; }
u64 connect_start() { return 0; }
u64 connect_end() { return 0; }
u64 secure_connection_start() { return 0; }
u64 request_start() { return 0; }
u64 response_start() { return 0; }
u64 response_end() { return 0; }
u64 dom_loading() { return 0; }
u64 dom_interactive() { return 0; }
u64 dom_content_loaded_event_start() { return 0; }
u64 dom_content_loaded_event_end() { return 0; }
u64 dom_complete() { return 0; }
u64 load_event_start() { return 0; }
u64 load_event_end() { return 0; }
private:
JS::Handle<HTML::Window> m_window;
};
}