mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:42:44 +00:00 
			
		
		
		
	 c37820b898
			
		
	
	
		c37820b898
		
	
	
	
	
		
			
			https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
		
			
				
	
	
		
			39 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 | |
|  * Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibJS/Forward.h>
 | |
| #include <LibJS/Runtime/JobCallback.h>
 | |
| #include <LibJS/Runtime/VM.h>
 | |
| #include <LibWeb/HTML/EventLoop/EventLoop.h>
 | |
| 
 | |
| namespace Web::Bindings {
 | |
| 
 | |
| struct WebEngineCustomData final : public JS::VM::CustomData {
 | |
|     virtual ~WebEngineCustomData() override = default;
 | |
| 
 | |
|     HTML::EventLoop event_loop;
 | |
| };
 | |
| 
 | |
| struct WebEngineCustomJobCallbackData final : public JS::JobCallback::CustomData {
 | |
|     WebEngineCustomJobCallbackData(HTML::EnvironmentSettingsObject& incumbent_settings, OwnPtr<JS::ExecutionContext> active_script_context)
 | |
|         : incumbent_settings(incumbent_settings)
 | |
|         , active_script_context(move(active_script_context))
 | |
|     {
 | |
|     }
 | |
| 
 | |
|     virtual ~WebEngineCustomJobCallbackData() override = default;
 | |
| 
 | |
|     HTML::EnvironmentSettingsObject& incumbent_settings;
 | |
|     OwnPtr<JS::ExecutionContext> active_script_context;
 | |
| };
 | |
| 
 | |
| HTML::ClassicScript* active_script();
 | |
| JS::VM& main_thread_vm();
 | |
| 
 | |
| }
 |