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(any(windows, test))]
19mod sleep;
20#[cfg(windows)]
21mod transport;
22
23#[cfg(windows)]
24pub use dialog::{DialogEvent, DialogHandle, DialogMode, DialogSpec, NEW_WINDOW_KIND};
25#[cfg(windows)]
26pub use embed::{EmbedEvent, EmbedSpec};
27pub use geometry::{EmbedBounds, local_cutouts};
28#[cfg(windows)]
29pub use host::{HostConfig, start};
30#[cfg(windows)]
31pub use main_embed::{EmbedHost, MainEmbed};
32#[cfg(windows)]
33pub use transport::{HostState, WebViewTransport};
34
35#[cfg(windows)]
36pub(crate) const FORWARDED_EVENTS: [&str; 2] = ["Runtime.bindingCalled", "Page.frameNavigated"];
37
38#[cfg(windows)]
39// A hidden window counts as occluded, so Chromium would otherwise throttle the Trouter keep-alive timers.
40pub(crate) const BROWSER_ARGUMENTS: &str = concat!(
41 "--disable-features=Translate,MediaRouter,OptimizationHints ",
42 "--disable-background-networking --disable-component-update --disable-default-apps ",
43 "--disable-breakpad --disable-client-side-phishing-detection --disable-gpu ",
44 "--disable-background-timer-throttling --disable-renderer-backgrounding --disable-backgrounding-occluded-windows",
45);