mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +00:00
LibWeb: Move AgentType enum to its own header
This commit is contained in:
parent
4af0daf3eb
commit
978a3b7321
Notes:
github-actions[bot]
2025-05-18 23:51:11 +00:00
Author: https://github.com/ADKaster
Commit: 978a3b7321
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4806
Reviewed-by: https://github.com/shannonbooth
Reviewed-by: https://github.com/trflynn89
3 changed files with 23 additions and 9 deletions
21
Libraries/LibWeb/Bindings/AgentType.h
Normal file
21
Libraries/LibWeb/Bindings/AgentType.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Andrew Kaster <andrew@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
|
||||
namespace Web::Bindings {
|
||||
|
||||
enum class AgentType : u8 {
|
||||
SimilarOriginWindow,
|
||||
DedicatedWorker,
|
||||
SharedWorker,
|
||||
ServiceWorker,
|
||||
Worklet,
|
||||
};
|
||||
|
||||
}
|
|
@ -10,6 +10,7 @@
|
|||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Runtime/JobCallback.h>
|
||||
#include <LibJS/Runtime/VM.h>
|
||||
#include <LibWeb/Bindings/AgentType.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/DOM/MutationObserver.h>
|
||||
#include <LibWeb/HTML/EventLoop/EventLoop.h>
|
||||
|
@ -32,14 +33,6 @@ struct WebEngineCustomJobCallbackData final : public JS::JobCallback::CustomData
|
|||
|
||||
HTML::Script* active_script();
|
||||
|
||||
enum class AgentType : u8 {
|
||||
SimilarOriginWindow,
|
||||
DedicatedWorker,
|
||||
SharedWorker,
|
||||
ServiceWorker,
|
||||
Worklet,
|
||||
};
|
||||
|
||||
void initialize_main_thread_vm(AgentType);
|
||||
JS::VM& main_thread_vm();
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <LibGfx/Size.h>
|
||||
#include <LibIPC/Forward.h>
|
||||
#include <LibURL/URL.h>
|
||||
#include <LibWeb/Bindings/MainThreadVM.h>
|
||||
#include <LibWeb/Bindings/AgentType.h>
|
||||
#include <LibWeb/CSS/PreferredColorScheme.h>
|
||||
#include <LibWeb/CSS/PreferredContrast.h>
|
||||
#include <LibWeb/CSS/PreferredMotion.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue