pub trait WebContextExt: 'static {
Show 49 methods fn add_path_to_sandbox(&self, path: impl AsRef<Path>, read_only: bool); fn allow_tls_certificate_for_host(
        &self,
        certificate: &impl IsA<TlsCertificate>,
        host: &str
    ); fn clear_cache(&self); fn download_uri(&self, uri: &str) -> Option<Download>; fn cache_model(&self) -> CacheModel; fn cookie_manager(&self) -> Option<CookieManager>; fn favicon_database(&self) -> Option<FaviconDatabase>; fn favicon_database_directory(&self) -> Option<GString>; fn geolocation_manager(&self) -> Option<GeolocationManager>; fn plugins<P: FnOnce(Result<Vec<Plugin>, Error>) + 'static>(
        &self,
        cancellable: Option<&impl IsA<Cancellable>>,
        callback: P
    ); fn plugins_future(
        &self
    ) -> Pin<Box_<dyn Future<Output = Result<Vec<Plugin>, Error>> + 'static>>; fn process_model(&self) -> ProcessModel; fn is_sandbox_enabled(&self) -> bool; fn security_manager(&self) -> Option<SecurityManager>; fn is_spell_checking_enabled(&self) -> bool; fn spell_checking_languages(&self) -> Vec<GString>; fn time_zone_override(&self) -> Option<GString>; fn tls_errors_policy(&self) -> TLSErrorsPolicy; fn uses_system_appearance_for_scrollbars(&self) -> bool; fn web_process_count_limit(&self) -> u32; fn website_data_manager(&self) -> Option<WebsiteDataManager>; fn initialize_notification_permissions(
        &self,
        allowed_origins: &[&SecurityOrigin],
        disallowed_origins: &[&SecurityOrigin]
    ); fn is_automation_allowed(&self) -> bool; fn is_ephemeral(&self) -> bool; fn prefetch_dns(&self, hostname: &str); fn register_uri_scheme<P: Fn(&URISchemeRequest) + 'static>(
        &self,
        scheme: &str,
        callback: P
    ); fn send_message_to_all_extensions(&self, message: &impl IsA<UserMessage>); fn set_additional_plugins_directory(&self, directory: &str); fn set_automation_allowed(&self, allowed: bool); fn set_cache_model(&self, cache_model: CacheModel); fn set_disk_cache_directory(&self, directory: &str); fn set_favicon_database_directory(&self, path: Option<&str>); fn set_preferred_languages(&self, languages: &[&str]); fn set_process_model(&self, process_model: ProcessModel); fn set_sandbox_enabled(&self, enabled: bool); fn set_spell_checking_enabled(&self, enabled: bool); fn set_spell_checking_languages(&self, languages: &[&str]); fn set_tls_errors_policy(&self, policy: TLSErrorsPolicy); fn set_use_system_appearance_for_scrollbars(&self, enabled: bool); fn set_web_extensions_directory(&self, directory: &str); fn set_web_extensions_initialization_user_data(&self, user_data: &Variant); fn set_web_process_count_limit(&self, limit: u32); fn local_storage_directory(&self) -> Option<GString>; fn is_process_swap_on_cross_site_navigation_enabled(&self) -> bool; fn connect_automation_started<F: Fn(&Self, &AutomationSession) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_download_started<F: Fn(&Self, &Download) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_initialize_notification_permissions<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_initialize_web_extensions<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_user_message_received<F: Fn(&Self, &UserMessage) -> bool + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Trait containing all WebContext methods.

Implementors

WebContext

Required Methods

Available on crate feature v2_26 only.

Adds a path to be mounted in the sandbox.

path must exist before any web process has been created otherwise it will be silently ignored. It is a fatal error to add paths after a web process has been spawned.

Paths in directories such as /sys, /proc, and /dev or all of / are not valid.

See also set_sandbox_enabled()

path

an absolute path to mount in the sandbox

read_only

if true the path will be read-only

Available on crate feature v2_6 only.
Available on crate feature v2_26 only.
👎Deprecated: Since 2.32
👎Deprecated: Since 2.32
Available on crate feature v2_4 only.
Available on crate feature v2_26 only.
Available on crate feature v2_38 only.
👎Deprecated: Since 2.32
Available on crate feature v2_30 only.
👎Deprecated: Since 2.26
Available on crate feature v2_10 only.
Available on crate feature v2_10 only.
Available on crate feature v2_16 only.
Available on crate feature v2_18 only.
Available on crate feature v2_16 only.
Available on crate feature v2_28 only.
👎Deprecated: Since 2.32
Available on crate feature v2_18 only.
👎Deprecated: Since 2.10
Available on crate feature v2_4 only.
Available on crate feature v2_26 only.
👎Deprecated: Since 2.32
Available on crate feature v2_30 only.
Available on crate feature v2_4 only.
👎Deprecated: Since 2.26
Available on crate feature v2_10 only.
👎Deprecated: Since 2.10
Available on crate feature v2_8 only.
Available on crate feature v2_28 only.
Available on crate feature v2_18 only.
Available on crate feature v2_16 only.
Available on crate feature v2_4 only.
Available on crate feature v2_28 only.

Implementors