Trait webkit2gtk::prelude::WebsiteDataManagerExt
source · [−]pub trait WebsiteDataManagerExt: 'static {
Show 23 methods
fn fetch<P: FnOnce(Result<Vec<WebsiteData>, Error>) + 'static>(
&self,
types: WebsiteDataTypes,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn fetch_future(
&self,
types: WebsiteDataTypes
) -> Pin<Box_<dyn Future<Output = Result<Vec<WebsiteData>, Error>> + 'static>>;
fn base_cache_directory(&self) -> Option<GString>;
fn base_data_directory(&self) -> Option<GString>;
fn cookie_manager(&self) -> Option<CookieManager>;
fn disk_cache_directory(&self) -> Option<GString>;
fn dom_cache_directory(&self) -> Option<GString>;
fn hsts_cache_directory(&self) -> Option<GString>;
fn indexeddb_directory(&self) -> Option<GString>;
fn itp_directory(&self) -> Option<GString>;
fn is_itp_enabled(&self) -> bool;
fn itp_summary<P: FnOnce(Result<Vec<ITPThirdParty>, Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
);
fn itp_summary_future(
&self
) -> Pin<Box_<dyn Future<Output = Result<Vec<ITPThirdParty>, Error>> + 'static>>;
fn local_storage_directory(&self) -> Option<GString>;
fn offline_application_cache_directory(&self) -> Option<GString>;
fn is_persistent_credential_storage_enabled(&self) -> bool;
fn service_worker_registrations_directory(&self) -> Option<GString>;
fn tls_errors_policy(&self) -> TLSErrorsPolicy;
fn websql_directory(&self) -> Option<GString>;
fn is_ephemeral(&self) -> bool;
fn set_itp_enabled(&self, enabled: bool);
fn set_persistent_credential_storage_enabled(&self, enabled: bool);
fn set_tls_errors_policy(&self, policy: TLSErrorsPolicy);
}
v2_10
only.Expand description
Required Methods
sourcefn fetch<P: FnOnce(Result<Vec<WebsiteData>, Error>) + 'static>(
&self,
types: WebsiteDataTypes,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn fetch<P: FnOnce(Result<Vec<WebsiteData>, Error>) + 'static>(
&self,
types: WebsiteDataTypes,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
v2_16
only.Asynchronously get the list of WebsiteData
for the given types
.
When the operation is finished, callback
will be called. You can then call
webkit_website_data_manager_fetch_finish()
to get the result of the operation.
types
cancellable
a gio::Cancellable
or None
to ignore
callback
a GAsyncReadyCallback
to call when the request is satisfied
sourcefn fetch_future(
&self,
types: WebsiteDataTypes
) -> Pin<Box_<dyn Future<Output = Result<Vec<WebsiteData>, Error>> + 'static>>
fn fetch_future(
&self,
types: WebsiteDataTypes
) -> Pin<Box_<dyn Future<Output = Result<Vec<WebsiteData>, Error>> + 'static>>
v2_16
only.sourcefn base_cache_directory(&self) -> Option<GString>
fn base_cache_directory(&self) -> Option<GString>
sourcefn base_data_directory(&self) -> Option<GString>
fn base_data_directory(&self) -> Option<GString>
sourcefn disk_cache_directory(&self) -> Option<GString>
fn disk_cache_directory(&self) -> Option<GString>
sourcefn dom_cache_directory(&self) -> Option<GString>
fn dom_cache_directory(&self) -> Option<GString>
v2_30
only.sourcefn hsts_cache_directory(&self) -> Option<GString>
fn hsts_cache_directory(&self) -> Option<GString>
v2_26
only.sourcefn indexeddb_directory(&self) -> Option<GString>
fn indexeddb_directory(&self) -> Option<GString>
sourcefn itp_directory(&self) -> Option<GString>
fn itp_directory(&self) -> Option<GString>
v2_30
only.sourcefn is_itp_enabled(&self) -> bool
fn is_itp_enabled(&self) -> bool
v2_30
only.sourcefn itp_summary<P: FnOnce(Result<Vec<ITPThirdParty>, Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn itp_summary<P: FnOnce(Result<Vec<ITPThirdParty>, Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
v2_30
only.Asynchronously get the list of ITPThirdParty
seen for self
.
Every ITPThirdParty
contains the list of ITPFirstParty
under which it has been seen.
When the operation is finished, callback
will be called. You can then call
webkit_website_data_manager_get_itp_summary_finish()
to get the result of the operation.
cancellable
a gio::Cancellable
or None
to ignore
callback
a GAsyncReadyCallback
to call when the request is satisfied
sourcefn itp_summary_future(
&self
) -> Pin<Box_<dyn Future<Output = Result<Vec<ITPThirdParty>, Error>> + 'static>>
fn itp_summary_future(
&self
) -> Pin<Box_<dyn Future<Output = Result<Vec<ITPThirdParty>, Error>> + 'static>>
v2_30
only.sourcefn local_storage_directory(&self) -> Option<GString>
fn local_storage_directory(&self) -> Option<GString>
sourcefn offline_application_cache_directory(&self) -> Option<GString>
fn offline_application_cache_directory(&self) -> Option<GString>
sourcefn is_persistent_credential_storage_enabled(&self) -> bool
fn is_persistent_credential_storage_enabled(&self) -> bool
v2_30
only.Get whether persistent credential storage is enabled or not.
See also set_persistent_credential_storage_enabled()
.
Returns
true
if persistent credential storage is enabled, or false
otherwise.
sourcefn service_worker_registrations_directory(&self) -> Option<GString>
fn service_worker_registrations_directory(&self) -> Option<GString>
v2_30
only.sourcefn tls_errors_policy(&self) -> TLSErrorsPolicy
fn tls_errors_policy(&self) -> TLSErrorsPolicy
v2_32
only.sourcefn websql_directory(&self) -> Option<GString>
fn websql_directory(&self) -> Option<GString>
Get the property::WebsiteDataManager::websql-directory
property.
Deprecated since 2.24
WebSQL is no longer supported. Use IndexedDB instead.
Returns
the directory where WebSQL databases are stored or None
if self
is ephemeral.
sourcefn is_ephemeral(&self) -> bool
fn is_ephemeral(&self) -> bool
v2_16
only.Get whether a WebsiteDataManager
is ephemeral.
See property::WebsiteDataManager::is-ephemeral
for more details.
Returns
sourcefn set_itp_enabled(&self, enabled: bool)
fn set_itp_enabled(&self, enabled: bool)
v2_30
only.Enable or disable Intelligent Tracking Prevention (ITP).
When ITP is enabled resource load statistics
are collected and used to decide whether to allow or block third-party cookies and prevent user tracking.
Note that while ITP is enabled the accept policy CookieAcceptPolicy::NoThirdParty
is ignored and
CookieAcceptPolicy::Always
is used instead. See also CookieManagerExt::set_accept_policy()
.
enabled
value to set
sourcefn set_persistent_credential_storage_enabled(&self, enabled: bool)
fn set_persistent_credential_storage_enabled(&self, enabled: bool)
v2_30
only.Enable or disable persistent credential storage.
When enabled, which is the default for non-ephemeral sessions, the network process will try to read and write HTTP authentiacation credentials from persistent storage.
enabled
value to set
sourcefn set_tls_errors_policy(&self, policy: TLSErrorsPolicy)
fn set_tls_errors_policy(&self, policy: TLSErrorsPolicy)
v2_32
only.