/* * Copyright (c) 2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::Platform { class EventLoopPlugin { public: static EventLoopPlugin& the(); static void install(EventLoopPlugin&); virtual ~EventLoopPlugin(); virtual void spin_until(Function goal_condition) = 0; virtual void deferred_invoke(Function) = 0; virtual NonnullRefPtr create_timer() = 0; virtual void quit() = 0; }; }