BlueGit

ict rusty-teams

Files

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

lib.rs

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