pub struct BasicChrome { /* private fields */ }Expand description
The default chrome for a browser window: a top toolbar and the page content area below it.
Implementations§
Source§impl BasicChrome
impl BasicChrome
Trait Implementations§
Source§impl Chrome for BasicChrome
impl Chrome for BasicChrome
Source§fn content_rect(&self, width: f32, height: f32) -> Rect
fn content_rect(&self, width: f32, height: f32) -> Rect
Rect of the content (web view). Read more
Source§fn draw(&mut self, cmd_buf: &mut Vec<DrawCommand>, width: f32, height: f32)
fn draw(&mut self, cmd_buf: &mut Vec<DrawCommand>, width: f32, height: f32)
Draws the chrome into
cmd_buf in window coordinates.Source§fn tick(
&mut self,
actions_buf: &mut Vec<ChromeAction>,
) -> (Vec<FetchRequest>, bool)
fn tick( &mut self, actions_buf: &mut Vec<ChromeAction>, ) -> (Vec<FetchRequest>, bool)
Advances chrome-owned tabs and returns their fetch and browser actions.
Source§fn deliver_fetch(
&mut self,
kind: FetchKind,
url: Url,
response: Result<BrowserResponse, BrowserNetworkError>,
)
fn deliver_fetch( &mut self, kind: FetchKind, url: Url, response: Result<BrowserResponse, BrowserNetworkError>, )
Delivers a resource fetch result requested by the chrome itself.
Source§fn sync_url(&mut self, url: Option<&str>)
fn sync_url(&mut self, url: Option<&str>)
Reflects the active tab’s URL, if the chrome shows one.
Source§fn pointer_event(
&mut self,
width: f32,
height: f32,
event: PointerEvent,
state: ElementState,
) -> ChromeEventResult
fn pointer_event( &mut self, width: f32, height: f32, event: PointerEvent, state: ElementState, ) -> ChromeEventResult
Dispatches a pointer event to the chrome. Read more
fn handle_scroll( &mut self, width: f32, height: f32, mouse_x: f32, mouse_y: f32, scroll_x: f32, scroll_y: f32, )
Source§fn accepts_text_input(&self) -> bool
fn accepts_text_input(&self) -> bool
Whether the chrome currently owns keyboard/IME input (e.g. a focused
address bar). While
true, key and IME events are routed to the chrome
instead of the page.Source§fn key_event(&mut self, event: &KeyEvent, ctrl: bool) -> ChromeAction
fn key_event(&mut self, event: &KeyEvent, ctrl: bool) -> ChromeAction
Dispatches a key event while the chrome owns text input.
Source§fn ime_event(&mut self, event: &Ime) -> ChromeAction
fn ime_event(&mut self, event: &Ime) -> ChromeAction
Dispatches an IME event while the chrome owns text input.
fn on_devtools_response(&mut self, id: u64, result: String)
Source§fn blur(&mut self)
fn blur(&mut self)
Drops any text-input focus held by the chrome (e.g. the user clicked the
page).
Source§fn needs_repaint(&self) -> bool
fn needs_repaint(&self) -> bool
Whether the chrome changed its visual state since the last check. Read more
Source§impl Debug for BasicChrome
impl Debug for BasicChrome
Auto Trait Implementations§
impl !Freeze for BasicChrome
impl !RefUnwindSafe for BasicChrome
impl !Send for BasicChrome
impl !Sync for BasicChrome
impl !UnwindSafe for BasicChrome
impl Unpin for BasicChrome
impl UnsafeUnpin for BasicChrome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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().