BlueGit

ict rusty-teams

Files

rusty-teams / crates / webview / src / lib.rs

lib.rs

lib.rs 1.2 KiB Download Raw
1#[cfg(windows)]
2mod dialog;
3#[cfg(windows)]
4mod embed;
5#[cfg(windows)]
6mod fanout;
7mod geometry;
8#[cfg(windows)]
9mod host;
10#[cfg(windows)]
11mod host_dialog;
12#[cfg(windows)]
13mod main_embed;
14#[cfg(windows)]
15mod transport;
16
17#[cfg(windows)]
18pub use dialog::{DialogEvent, DialogHandle, DialogSpec};
19#[cfg(windows)]
20pub use embed::{EmbedEvent, EmbedSpec};
21pub use geometry::{EmbedBounds, local_cutouts};
22#[cfg(windows)]
23pub use host::{HostConfig, start};
24#[cfg(windows)]
25pub use main_embed::{EmbedHost, MainEmbed};
26#[cfg(windows)]
27pub use transport::{HostState, WebViewTransport};
28
29#[cfg(windows)]
30pub(crate) const FORWARDED_EVENTS: [&str; 2] = ["Runtime.bindingCalled", "Page.frameNavigated"];
31
32#[cfg(windows)]
33// A hidden window counts as occluded, so Chromium would otherwise throttle the Trouter keep-alive timers.
34pub(crate) const BROWSER_ARGUMENTS: &str = concat!(
35 "--disable-features=Translate,MediaRouter,OptimizationHints ",
36 "--disable-background-networking --disable-component-update --disable-default-apps ",
37 "--disable-breakpad --disable-client-side-phishing-detection --disable-gpu ",
38 "--disable-background-timer-throttling --disable-renderer-backgrounding --disable-backgrounding-occluded-windows",
39);