pub struct Pipeline {Show 15 fields
pub id: PipelineId,
pub browsing_context_id: BrowsingContextId,
pub webview_id: WebViewId,
pub opener: Option<BrowsingContextId>,
pub event_loop: Rc<EventLoop>,
pub compositor_proxy: CompositorProxy,
pub url: ServoUrl,
pub animation_state: AnimationState,
pub children: Vec<BrowsingContextId>,
pub load_data: LoadData,
pub history_state_id: Option<HistoryStateId>,
pub history_states: HashSet<HistoryStateId>,
pub completely_loaded: bool,
pub title: String,
pub focus_sequence: FocusSequenceNumber,
}Expand description
A Pipeline is the constellation’s view of a Window. Each pipeline has an event loop
(executed by a script thread). A script thread may be responsible for many pipelines.
Fields§
§id: PipelineIdThe ID of the pipeline.
browsing_context_id: BrowsingContextIdThe ID of the browsing context that contains this Pipeline.
webview_id: WebViewIdThe WebViewId of the WebView that contains this Pipeline.
opener: Option<BrowsingContextId>§event_loop: Rc<EventLoop>The event loop handling this pipeline.
compositor_proxy: CompositorProxyA channel to the compositor.
url: ServoUrlThe most recently loaded URL in this pipeline. Note that this URL can change, for example if the page navigates to a hash URL.
animation_state: AnimationStateWhether this pipeline is currently running animations. Pipelines that are running animations cause composites to be continually scheduled.
children: Vec<BrowsingContextId>The child browsing contexts of this pipeline (these are iframes in the document).
load_data: LoadDataThe Load Data used to create this pipeline.
history_state_id: Option<HistoryStateId>The active history state for this pipeline.
history_states: HashSet<HistoryStateId>The history states owned by this pipeline.
completely_loaded: boolHas this pipeline received a notification that it is completely loaded?
title: StringThe title of this pipeline’s document.
focus_sequence: FocusSequenceNumberImplementations§
Source§impl Pipeline
impl Pipeline
Sourcepub fn spawn<STF: ScriptThreadFactory>(
state: InitialPipelineState,
) -> Result<NewPipeline, Error>
pub fn spawn<STF: ScriptThreadFactory>( state: InitialPipelineState, ) -> Result<NewPipeline, Error>
Possibly starts a script thread, in a new process if requested.
Sourcepub fn new(
id: PipelineId,
browsing_context_id: BrowsingContextId,
webview_id: WebViewId,
opener: Option<BrowsingContextId>,
event_loop: Rc<EventLoop>,
compositor_proxy: CompositorProxy,
throttled: bool,
load_data: LoadData,
) -> Pipeline
pub fn new( id: PipelineId, browsing_context_id: BrowsingContextId, webview_id: WebViewId, opener: Option<BrowsingContextId>, event_loop: Rc<EventLoop>, compositor_proxy: CompositorProxy, throttled: bool, load_data: LoadData, ) -> Pipeline
Creates a new Pipeline, after the script has been spawned.
Sourcepub fn send_exit_message_to_script(&self, discard_bc: DiscardBrowsingContext)
pub fn send_exit_message_to_script(&self, discard_bc: DiscardBrowsingContext)
Let the ScriptThread for this Pipeline know that it has exited. If the ScriptThread hasn’t
panicked and is still alive, it will send a PipelineExited message back to the Constellation
when it finishes cleaning up.
Sourcepub fn set_activity(&self, activity: DocumentActivity)
pub fn set_activity(&self, activity: DocumentActivity)
Notify this pipeline of its activity.
Sourcepub fn to_sendable(&self) -> CompositionPipeline
pub fn to_sendable(&self) -> CompositionPipeline
The compositor’s view of a pipeline.
Sourcepub fn add_child(&mut self, browsing_context_id: BrowsingContextId)
pub fn add_child(&mut self, browsing_context_id: BrowsingContextId)
Add a new child browsing context.
Sourcepub fn remove_child(&mut self, browsing_context_id: BrowsingContextId)
pub fn remove_child(&mut self, browsing_context_id: BrowsingContextId)
Remove a child browsing context.
Sourcepub fn set_throttled(&self, throttled: bool)
pub fn set_throttled(&self, throttled: bool)
Set whether to make pipeline use less resources, by stopping animations and running timers at a heavily limited rate.
Auto Trait Implementations§
impl Freeze for Pipeline
impl !RefUnwindSafe for Pipeline
impl !Send for Pipeline
impl !Sync for Pipeline
impl Unpin for Pipeline
impl !UnwindSafe for Pipeline
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