Trait webview2_sys::ICoreWebView2EnvironmentOptions[][src]

pub trait ICoreWebView2EnvironmentOptions: IUnknown {
    unsafe fn get_additional_browser_arguments(
        &self,
        value: *mut LPWSTR
    ) -> HRESULT;
unsafe fn put_additional_browser_arguments(&self, value: LPCWSTR) -> HRESULT;
unsafe fn get_language(&self, value: *mut LPWSTR) -> HRESULT;
unsafe fn put_language(&self, value: LPCWSTR) -> HRESULT;
unsafe fn get_target_compatible_browser_version(
        &self,
        value: *mut LPWSTR
    ) -> HRESULT;
unsafe fn put_target_compatible_browser_version(
        &self,
        value: LPCWSTR
    ) -> HRESULT;
unsafe fn get_allow_single_sign_on_using_osprimary_account(
        &self,
        allow: *mut BOOL
    ) -> HRESULT;
unsafe fn put_allow_single_sign_on_using_osprimary_account(
        &self,
        allow: BOOL
    ) -> HRESULT; }

Options used to create WebView2 Environment. A default implementation is provided in WebView2EnvironmentOptions.h.

\snippet AppWindow.cpp CreateCoreWebView2EnvironmentWithOptions

Required methods

unsafe fn get_additional_browser_arguments(&self, value: *mut LPWSTR) -> HRESULT[src]

Changes the behavior of the WebView. The arguments are passed to the browser process as part of the command. For more information about using command-line switches with Chromium browser processes, navigate to [Run Chromium with Flags][ChromiumDevelopersHowTosRunWithFlags]. The value appended to a switch is appended to the browser process, for example, in --edge-webview-switches=xxx the value is xxx. If you specify a switch that is important to WebView functionality, it is ignored, for example, --user-data-dir. Specific features are disabled internally and blocked from being enabled. If a switch is specified multiple times, only the last instance is used.

> [!NOTE] A merge of the different values of the same switch is not attempted, except for disabled and enabled features. The features specified by --enable-features and --disable-features are merged with simple logic.\n> * The features is the union of the specified features and built-in features. If a feature is disabled, it is removed from the enabled features list.

If you specify command-line switches and use the additionalBrowserArguments parameter, the --edge-webview-switches value takes precedence and is processed last. If a switch fails to parse, the switched is ignored. The default state for the operation is to run the browser process with no extra flags.

[ChromiumDevelopersHowTosRunWithFlags]: https://www.chromium.org/developers/how-tos/run-chromium-with-flags “Run Chromium with flags | The Chromium Projects”

unsafe fn put_additional_browser_arguments(&self, value: LPCWSTR) -> HRESULT[src]

Sets the AdditionalBrowserArguments property.

unsafe fn get_language(&self, value: *mut LPWSTR) -> HRESULT[src]

The default display language for WebView. It applies to browser UI such as context menu and dialogs. It also applies to the accept-languages HTTP header that WebView sends to websites. It is in the format of language[-country] where language is the 2-letter code from

[ISO 639][ISO639LanguageCodesHtml] and country is the 2-letter code from [ISO 3166][ISOStandard72482Html].

[ISO639LanguageCodesHtml]: https://www.iso.org/iso-639-language-codes.html “ISO 639 | ISO”

[ISOStandard72482Html]: https://www.iso.org/standard/72482.html “ISO 3166-1:2020 | ISO”

unsafe fn put_language(&self, value: LPCWSTR) -> HRESULT[src]

Sets the Language property.

unsafe fn get_target_compatible_browser_version(
    &self,
    value: *mut LPWSTR
) -> HRESULT
[src]

Specifies the version of the WebView2 Runtime binaries required to be compatible with your app. This defaults to the WebView2 Runtime version that corresponds with the version of the SDK the app is using. The format of this value is the same as the format of the BrowserVersionString property and other BrowserVersion values. Only the version part of the BrowserVersion value is respected. The channel suffix, if it exists, is ignored. The version of the WebView2 Runtime binaries actually used may be different from the specified TargetCompatibleBrowserVersion. The binaries are only guaranteed to be compatible. Verify the actual version on the BrowserVersionString property on the ICoreWebView2Environment.

unsafe fn put_target_compatible_browser_version(
    &self,
    value: LPCWSTR
) -> HRESULT
[src]

Sets the TargetCompatibleBrowserVersion property.

unsafe fn get_allow_single_sign_on_using_osprimary_account(
    &self,
    allow: *mut BOOL
) -> HRESULT
[src]

The AllowSingleSignOnUsingOSPrimaryAccount property is used to enable single sign on with Azure Active Directory (AAD) and personal Microsoft Account (MSA) resources inside WebView. All AAD accounts, connected to Windows and shared for all apps, are supported. For MSA, SSO is only enabled for the account associated for Windows account login, if any. Default is disabled. Universal Windows Platform apps must also declare enterpriseCloudSSO [Restricted capabilities][WindowsUwpPackagingAppCapabilityDeclarationsRestrictedCapabilities] for the single sign on (SSO) to work.

[WindowsUwpPackagingAppCapabilityDeclarationsRestrictedCapabilities]: /windows/uwp/packaging/app-capability-declarations#restricted-capabilities “Restricted capabilities - App capability declarations | Microsoft Docs”

unsafe fn put_allow_single_sign_on_using_osprimary_account(
    &self,
    allow: BOOL
) -> HRESULT
[src]

Sets the AllowSingleSignOnUsingOSPrimaryAccount property.

Loading content...

Trait Implementations

impl ComInterface for dyn ICoreWebView2EnvironmentOptions[src]

type VTable = ICoreWebView2EnvironmentOptionsVTable

A COM compatible V-Table

type Super = dyn IUnknown

The interface that this interface inherits from

impl<C: ICoreWebView2EnvironmentOptions> ProductionComInterface<C> for dyn ICoreWebView2EnvironmentOptions[src]

Implementations on Foreign Types

impl<T: ICoreWebView2EnvironmentOptions + ComInterface + ?Sized> ICoreWebView2EnvironmentOptions for ComRc<T>[src]

impl<T: ICoreWebView2EnvironmentOptions + ComInterface + ?Sized> ICoreWebView2EnvironmentOptions for ComPtr<T>[src]

Loading content...

Implementors

Loading content...