BlueGit

ict rusty-teams

Files

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

lib.rs

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