Struct script_traits::InitialScriptState
source · pub struct InitialScriptState {Show 26 fields
pub id: PipelineId,
pub parent_info: Option<PipelineId>,
pub browsing_context_id: BrowsingContextId,
pub top_level_browsing_context_id: TopLevelBrowsingContextId,
pub opener: Option<BrowsingContextId>,
pub inherited_secure_context: Option<bool>,
pub control_chan: IpcSender<ConstellationControlMsg>,
pub control_port: IpcReceiver<ConstellationControlMsg>,
pub script_to_constellation_chan: ScriptToConstellationChan,
pub background_hang_monitor_register: Box<dyn BackgroundHangMonitorRegister>,
pub layout_to_constellation_chan: IpcSender<LayoutMsg>,
pub scheduler_chan: IpcSender<TimerSchedulerMsg>,
pub resource_threads: ResourceThreads,
pub bluetooth_thread: IpcSender<BluetoothRequest>,
pub image_cache: Arc<dyn ImageCache>,
pub time_profiler_chan: ProfilerChan,
pub mem_profiler_chan: ProfilerChan,
pub devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
pub window_size: WindowSizeData,
pub pipeline_namespace_id: PipelineNamespaceId,
pub content_process_shutdown_chan: Sender<()>,
pub webgl_chan: Option<WebGLPipeline>,
pub webxr_registry: Option<Registry>,
pub webrender_document: DocumentId,
pub compositor_api: CrossProcessCompositorApi,
pub player_context: WindowGLContext,
}
Expand description
Data needed to construct a script thread.
NB: DO NOT add any Senders or Receivers here! pcwalton will have to rewrite your code if you do! Use IPC senders and receivers instead.
Fields§
§id: PipelineId
The ID of the pipeline with which this script thread is associated.
parent_info: Option<PipelineId>
The subpage ID of this pipeline to create in its pipeline parent.
If None
, this is the root.
browsing_context_id: BrowsingContextId
The ID of the browsing context this script is part of.
top_level_browsing_context_id: TopLevelBrowsingContextId
The ID of the top-level browsing context this script is part of.
opener: Option<BrowsingContextId>
The ID of the opener, if any.
inherited_secure_context: Option<bool>
Loading into a Secure Context
control_chan: IpcSender<ConstellationControlMsg>
A channel with which messages can be sent to us (the script thread).
control_port: IpcReceiver<ConstellationControlMsg>
A port on which messages sent by the constellation to script can be received.
script_to_constellation_chan: ScriptToConstellationChan
A channel on which messages can be sent to the constellation from script.
background_hang_monitor_register: Box<dyn BackgroundHangMonitorRegister>
A handle to register script-(and associated layout-)threads for hang monitoring.
layout_to_constellation_chan: IpcSender<LayoutMsg>
A sender layout to communicate to the constellation.
scheduler_chan: IpcSender<TimerSchedulerMsg>
A channel to schedule timer events.
resource_threads: ResourceThreads
A channel to the resource manager thread.
bluetooth_thread: IpcSender<BluetoothRequest>
A channel to the bluetooth thread.
image_cache: Arc<dyn ImageCache>
The image cache for this script thread.
time_profiler_chan: ProfilerChan
A channel to the time profiler thread.
mem_profiler_chan: ProfilerChan
A channel to the memory profiler thread.
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>
A channel to the developer tools, if applicable.
window_size: WindowSizeData
Information about the initial window size.
pipeline_namespace_id: PipelineNamespaceId
The ID of the pipeline namespace for this script thread.
content_process_shutdown_chan: Sender<()>
A ping will be sent on this channel once the script thread shuts down.
webgl_chan: Option<WebGLPipeline>
A channel to the WebGL thread used in this pipeline.
webxr_registry: Option<Registry>
The XR device registry
webrender_document: DocumentId
The Webrender document ID associated with this thread.
compositor_api: CrossProcessCompositorApi
Access to the compositor across a process boundary.
player_context: WindowGLContext
Application window’s GL Context for Media player
Auto Trait Implementations§
impl !Freeze for InitialScriptState
impl !RefUnwindSafe for InitialScriptState
impl Send for InitialScriptState
impl !Sync for InitialScriptState
impl Unpin for InitialScriptState
impl !UnwindSafe for InitialScriptState
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more