// Engine/Source/Runtime/WebBrowser/Private/CEF/CEFBrowserClosureTask.h #pragma once #include "CoreMinimal.h" #if WITH_CEF3 #include "CEFInterfaceLibCefIncludes.h" // Helper for posting a closure as a task class FCEFInterfaceBrowserClosureTask : public CefTask { public: FCEFInterfaceBrowserClosureTask(CefRefPtr InHandle, TFunction InClosure) : Handle(InHandle) , Closure(InClosure) { } virtual void Execute() override { Closure(); } private: CefRefPtr Handle; // Used so the handler will not go out of scope before the closure is executed. TFunction Closure; IMPLEMENT_REFCOUNTING(FCEFInterfaceBrowserClosureTask); }; #endif /* WITH_CEF3 */