1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:57:35 +00:00

LibWeb+WebContent: Add abstraction layer for event loop and timers

Instead of using Core::EventLoop and Core::Timer directly, LibWeb now
goes through a Web::Platform abstraction layer instead.

This will allow us to plug in Qt's event loop (and QTimer) over in
Ladybird, to avoid having to deal with multiple event loops.
This commit is contained in:
Andreas Kling 2022-09-07 20:30:31 +02:00
parent 7e5a8bd4b0
commit 9567e211e7
28 changed files with 365 additions and 42 deletions

View file

@ -7,8 +7,8 @@
#pragma once
#include <AK/Function.h>
#include <LibCore/Timer.h>
#include <LibWeb/Loader/ImageResource.h>
#include <LibWeb/Platform/Timer.h>
namespace Web {
@ -60,7 +60,7 @@ private:
size_t m_current_frame_index { 0 };
size_t m_loops_completed { 0 };
LoadingState m_loading_state { LoadingState::Loading };
NonnullRefPtr<Core::Timer> m_timer;
NonnullRefPtr<Platform::Timer> m_timer;
size_t m_redirects_count { 0 };
};