| 1 | #[cfg(any(windows, test))] |
| 2 | mod cdp_failure; |
| 3 | #[cfg(windows)] |
| 4 | mod dialog; |
| 5 | #[cfg(windows)] |
| 6 | mod embed; |
| 7 | #[cfg(windows)] |
| 8 | mod fanout; |
| 9 | mod geometry; |
| 10 | #[cfg(windows)] |
| 11 | mod host; |
| 12 | #[cfg(windows)] |
| 13 | mod host_dialog; |
| 14 | #[cfg(windows)] |
| 15 | mod main_embed; |
| 16 | #[cfg(any(windows, test))] |
| 17 | mod park; |
| 18 | #[cfg(windows)] |
| 19 | mod transport; |
| 20 | |
| 21 | #[cfg(windows)] |
| 22 | pub use dialog::{DialogEvent, DialogHandle, DialogSpec}; |
| 23 | #[cfg(windows)] |
| 24 | pub use embed::{EmbedEvent, EmbedSpec}; |
| 25 | pub use geometry::{EmbedBounds, local_cutouts}; |
| 26 | #[cfg(windows)] |
| 27 | pub use host::{HostConfig, start}; |
| 28 | #[cfg(windows)] |
| 29 | pub use main_embed::{EmbedHost, MainEmbed}; |
| 30 | #[cfg(windows)] |
| 31 | pub use transport::{HostState, WebViewTransport}; |
| 32 | |
| 33 | #[cfg(windows)] |
| 34 | pub(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. |
| 38 | pub(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 | ); |