mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWebView+WebContent: Inform WebContent process if browser is headless
This commit is contained in:
parent
520bf6c9be
commit
e764df15eb
Notes:
github-actions[bot]
2024-12-10 18:32:56 +00:00
Author: https://github.com/tcl3
Commit: e764df15eb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2858
Reviewed-by: https://github.com/trflynn89
9 changed files with 31 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
|||
namespace WebContent {
|
||||
|
||||
static PageClient::UseSkiaPainter s_use_skia_painter = PageClient::UseSkiaPainter::GPUBackendIfAvailable;
|
||||
static bool s_is_headless { false };
|
||||
|
||||
GC_DEFINE_ALLOCATOR(PageClient);
|
||||
|
||||
|
@ -40,6 +41,16 @@ void PageClient::set_use_skia_painter(UseSkiaPainter use_skia_painter)
|
|||
s_use_skia_painter = use_skia_painter;
|
||||
}
|
||||
|
||||
bool PageClient::is_headless() const
|
||||
{
|
||||
return s_is_headless;
|
||||
}
|
||||
|
||||
void PageClient::set_is_headless(bool is_headless)
|
||||
{
|
||||
s_is_headless = is_headless;
|
||||
}
|
||||
|
||||
GC::Ref<PageClient> PageClient::create(JS::VM& vm, PageHost& page_host, u64 id)
|
||||
{
|
||||
return vm.heap().allocate<PageClient>(page_host, id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue