ICoreWebView2Profile4

Undocumented in source.

Members

Functions

GetNonDefaultPermissionSettings
HRESULT GetNonDefaultPermissionSettings(ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler completedHandler)

Invokes the handler with a collection of all nondefault permission settings. Use this method to get the permission state set in the current and previous sessions.

SetPermissionState
HRESULT SetPermissionState(COREWEBVIEW2_PERMISSION_KIND permissionKind, LPCWSTR origin, COREWEBVIEW2_PERMISSION_STATE state, ICoreWebView2SetPermissionStateCompletedHandler completedHandler)

Sets permission state for the given permission kind and origin asynchronously. The change persists across sessions until it is changed by another call to SetPermissionState, or by setting the State property in PermissionRequestedEventArgs. Setting the state to COREWEBVIEW2_PERMISSION_STATE_DEFAULT will erase any state saved in the profile and restore the default behavior. The origin should have a valid scheme and host (e.g. "https://www.example.com"), otherwise the method fails with E_INVALIDARG. Additional URI parts like path and fragment are ignored. For example, "https://wwww.example.com/app1/index.html/" is treated the same as "https://wwww.example.com". See the MDN origin definition

for more details.

Inherited Members

From ICoreWebView2Profile3

get_PreferredTrackingPreventionLevel
HRESULT get_PreferredTrackingPreventionLevel(COREWEBVIEW2_TRACKING_PREVENTION_LEVEL* value)

The PreferredTrackingPreventionLevel property allows you to control levels of tracking prevention for WebView2 which are associated with a profile. This level would apply to the context of the profile. That is, all WebView2s sharing the same profile will be affected and also the value is persisted in the user data folder.

put_PreferredTrackingPreventionLevel
HRESULT put_PreferredTrackingPreventionLevel(COREWEBVIEW2_TRACKING_PREVENTION_LEVEL value)

Set the PreferredTrackingPreventionLevel property.

Meta