pub trait ICoreWebView2Settings2: ICoreWebView2Settings {
// Required methods
unsafe fn get_user_agent(&self, user_agent: *mut LPWSTR) -> HRESULT;
unsafe fn put_user_agent(&self, user_agent: LPCWSTR) -> HRESULT;
}Expand description
A continuation of the ICoreWebView2Settings interface that manages the user agent.
Required Methods§
Sourceunsafe fn get_user_agent(&self, user_agent: *mut LPWSTR) -> HRESULT
unsafe fn get_user_agent(&self, user_agent: *mut LPWSTR) -> HRESULT
Returns the User Agent. The default value is the default User Agent of the Microsoft Edge browser.
\snippet SettingsComponent.cpp UserAgent
Sourceunsafe fn put_user_agent(&self, user_agent: LPCWSTR) -> HRESULT
unsafe fn put_user_agent(&self, user_agent: LPCWSTR) -> HRESULT
Sets the UserAgent property. This property may be overridden if
the User-Agent header is set in a request. If the parameter is empty
the User Agent will not be updated and the current User Agent will remain.
Trait Implementations§
Source§impl ComInterface for dyn ICoreWebView2Settings2
impl ComInterface for dyn ICoreWebView2Settings2
Source§type VTable = ICoreWebView2Settings2VTable
type VTable = ICoreWebView2Settings2VTable
A COM compatible V-Table
Source§type Super = dyn ICoreWebView2Settings
type Super = dyn ICoreWebView2Settings
The interface that this interface inherits from
Source§fn is_iid_in_inheritance_chain(riid: &GUID) -> bool
fn is_iid_in_inheritance_chain(riid: &GUID) -> bool
Check whether a given IID is in the inheritance hierarchy of this interface