Struct constellation::webview::WebViewManager
source · pub struct WebViewManager<WebView> {
webviews: HashMap<TopLevelBrowsingContextId, WebView>,
focus_order: Vec<TopLevelBrowsingContextId>,
is_focused: bool,
}
Fields§
§webviews: HashMap<TopLevelBrowsingContextId, WebView>
Our top-level browsing contexts. In the WebRender scene, their pipelines are the children of a single root pipeline that also applies any pinch zoom transformation.
focus_order: Vec<TopLevelBrowsingContextId>
The order in which they were focused, latest last.
is_focused: bool
Whether the latest webview in focus order is currently focused.
Implementations§
source§impl<WebView> WebViewManager<WebView>
impl<WebView> WebViewManager<WebView>
pub fn add( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, webview: WebView, )
pub fn remove( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, ) -> Option<WebView>
pub fn get( &self, top_level_browsing_context_id: TopLevelBrowsingContextId, ) -> Option<&WebView>
pub fn get_mut( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, ) -> Option<&mut WebView>
pub fn focused_webview(&self) -> Option<(TopLevelBrowsingContextId, &WebView)>
pub fn focus( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, )
pub fn unfocus(&mut self)
Trait Implementations§
source§impl<WebView: Debug> Debug for WebViewManager<WebView>
impl<WebView: Debug> Debug for WebViewManager<WebView>
Auto Trait Implementations§
impl<WebView> Freeze for WebViewManager<WebView>
impl<WebView> RefUnwindSafe for WebViewManager<WebView>where
WebView: RefUnwindSafe,
impl<WebView> Send for WebViewManager<WebView>where
WebView: Send,
impl<WebView> Sync for WebViewManager<WebView>where
WebView: Sync,
impl<WebView> Unpin for WebViewManager<WebView>where
WebView: Unpin,
impl<WebView> UnwindSafe for WebViewManager<WebView>where
WebView: UnwindSafe,
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.