mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-18 09:50:27 +00:00
EventLoopPluginSerenity was the only implementation of the abstract EventLoopPlugin base class. Its methods simply wrapped Core::EventLoop calls with GC function unwrapping. Remove the virtual dispatch by making EventLoopPlugin concrete and absorbing the EventLoopPluginSerenity implementation directly.
27 lines
535 B
C++
27 lines
535 B
C++
/*
|
|
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Forward.h>
|
|
#include <LibGC/Function.h>
|
|
#include <LibWeb/Export.h>
|
|
|
|
namespace Web::Platform {
|
|
|
|
class WEB_API EventLoopPlugin {
|
|
public:
|
|
static EventLoopPlugin& the();
|
|
static void install(EventLoopPlugin&);
|
|
|
|
~EventLoopPlugin();
|
|
|
|
void spin_until(GC::Root<GC::Function<bool()>> goal_condition);
|
|
void deferred_invoke(ESCAPING GC::Root<GC::Function<void()>>);
|
|
void quit();
|
|
};
|
|
|
|
}
|