// Copyright (c) 2025 Salesforce, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #ifndef ELECTRON_SHELL_RENDERER_PRELOAD_REALM_CONTEXT_H_ #define ELECTRON_SHELL_RENDERER_PRELOAD_REALM_CONTEXT_H_ #include "v8/include/v8-forward.h" namespace electron { class ServiceWorkerData; } namespace electron::preload_realm { // Get initiator context given the preload context. v8::MaybeLocal GetInitiatorContext(v8::Local context); // Get the preload context given the initiator context. v8::MaybeLocal GetPreloadRealmContext( v8::Local context); // Get service worker data given the preload realm context. electron::ServiceWorkerData* GetServiceWorkerData( v8::Local context); // Create void OnCreatePreloadableV8Context( v8::Local initiator_context, electron::ServiceWorkerData* service_worker_data); } // namespace electron::preload_realm #endif // ELECTRON_SHELL_RENDERER_PRELOAD_REALM_CONTEXT_H_