pub struct BrowsingContext {
pub bc_group_id: BrowsingContextGroupId,
pub id: BrowsingContextId,
pub webview_id: WebViewId,
pub viewport_details: ViewportDetails,
pub is_private: bool,
pub inherited_secure_context: Option<bool>,
pub throttled: bool,
pub pipeline_id: PipelineId,
pub parent_pipeline_id: Option<PipelineId>,
pub pipelines: FxHashSet<PipelineId>,
}Expand description
The constellation’s view of a browsing context. Each browsing context has a session history, caused by navigation and traversing the history. Each browsing context has its current entry, plus past and future entries. The past is sorted chronologically, the future is sorted reverse chronologically: in particular prev.pop() is the latest past entry, and next.pop() is the earliest future entry.
Fields§
§bc_group_id: BrowsingContextGroupIdThe browsing context group id where the top-level of this bc is found.
id: BrowsingContextIdThe browsing context id.
webview_id: WebViewIdThe top-level browsing context ancestor
viewport_details: ViewportDetailsThe ViewportDetails of the frame that this BrowsingContext represents.
is_private: boolWhether this browsing context is in private browsing mode.
inherited_secure_context: Option<bool>Whether this browsing context inherits a secure context.
throttled: boolWhether this browsing context should be throttled, using less resources by stopping animations and running timers at a heavily limited rate.
pipeline_id: PipelineIdThe pipeline for the current session history entry.
parent_pipeline_id: Option<PipelineId>The parent pipeline that contains this browsing context. None if this
is a top level browsing context.
pipelines: FxHashSet<PipelineId>All the pipelines that have been presented or will be presented in this browsing context.
Implementations§
Source§impl BrowsingContext
impl BrowsingContext
Sourcepub fn new(
bc_group_id: BrowsingContextGroupId,
id: BrowsingContextId,
webview_id: WebViewId,
pipeline_id: PipelineId,
parent_pipeline_id: Option<PipelineId>,
viewport_details: ViewportDetails,
is_private: bool,
inherited_secure_context: Option<bool>,
throttled: bool,
) -> BrowsingContext
pub fn new( bc_group_id: BrowsingContextGroupId, id: BrowsingContextId, webview_id: WebViewId, pipeline_id: PipelineId, parent_pipeline_id: Option<PipelineId>, viewport_details: ViewportDetails, is_private: bool, inherited_secure_context: Option<bool>, throttled: bool, ) -> BrowsingContext
Create a new browsing context. Note this just creates the browsing context, it doesn’t add it to the constellation’s set of browsing contexts.
pub fn update_current_entry(&mut self, pipeline_id: PipelineId)
Sourcepub fn is_top_level(&self) -> bool
pub fn is_top_level(&self) -> bool
Is this a top-level browsing context?
Auto Trait Implementations§
impl Freeze for BrowsingContext
impl RefUnwindSafe for BrowsingContext
impl Send for BrowsingContext
impl Sync for BrowsingContext
impl Unpin for BrowsingContext
impl UnwindSafe for BrowsingContext
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