WebKit.XRPermissionRequest

g GObject.GInterface GObject.GInterface WebKit.PermissionRequest WebKit.PermissionRequest GObject.GInterface->WebKit.PermissionRequest GObject.Object GObject.Object WebKit.XRPermissionRequest WebKit.XRPermissionRequest GObject.Object->WebKit.XRPermissionRequest WebKit.PermissionRequest->WebKit.XRPermissionRequest

Subclasses:

None

Methods

Inherited:

GObject.Object (37), WebKit.PermissionRequest (2)

Structs:

GObject.ObjectClass (5)

get_consent_optional_features ()

get_consent_required_features ()

get_granted_features ()

get_optional_features_requested ()

get_required_features_requested ()

get_security_origin ()

get_session_mode ()

set_granted_optional_features (granted)

Virtual Methods

Inherited:

GObject.Object (7), WebKit.PermissionRequest (2)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class WebKit.XRPermissionRequest(**kwargs)
Bases:

GObject.Object, WebKit.PermissionRequest

Abstract:

No

Structure:

WebKit.XRPermissionRequestClass

A permission request for accessing virtual reality (VR) and augmented reality (AR) devices, including sensors and head-mounted displays.

WebKit.XRPermissionRequest represents a request for permission to decide whether WebKit can initialize an XR session through the WebXR API.

When a WebKit.XRPermissionRequest is not handled by the user, it is denied by default.

Added in version 2.52.

Returns:

a WebKit.XRSessionFeatures flag combination

Return type:

WebKit.XRSessionFeatures

Gets the optional features that need user consent.

These features can be granted by calling WebKit.XRPermissionRequest.set_granted_optional_features() before allowing the request with WebKit.PermissionRequest.allow().

Added in version 2.52.

Returns:

a WebKit.XRSessionFeatures flag combination

Return type:

WebKit.XRSessionFeatures

Gets the required features that need user consent.

These features are automatically granted if the request is allowed with WebKit.PermissionRequest.allow().

Added in version 2.52.

get_granted_features()
Returns:

a WebKit.XRSessionFeatures flag combination

Return type:

WebKit.XRSessionFeatures

Gets the features requested by the origin for the XR device, which are either granted by default or have been explicitly granted by the user.

Added in version 2.52.

get_optional_features_requested()
Returns:

a WebKit.XRSessionFeatures flag combination

Return type:

WebKit.XRSessionFeatures

Gets the full set of optional features requested by the web application.

This includes both already granted features and those requiring consent.

Added in version 2.52.

get_required_features_requested()
Returns:

a WebKit.XRSessionFeatures flag combination

Return type:

WebKit.XRSessionFeatures

Gets the full set of required features requested by the web application.

This includes both already granted features and those requiring consent.

Added in version 2.52.

get_security_origin()
Returns:

the WebKit.SecurityOrigin that initiated the request

Return type:

WebKit.SecurityOrigin

Gets the security origin that initiated the permission request.

Added in version 2.52.

get_session_mode()
Returns:

a WebKit.XRSessionMode

Return type:

WebKit.XRSessionMode

Gets the session mode for which permission is being requested.

Added in version 2.52.

set_granted_optional_features(granted)
Parameters:

granted (WebKit.XRSessionFeatures) – granted features

Sets which optional features should be granted if the permission request is allowed.

This function should be called with a subset of the features from WebKit.XRPermissionRequest.get_consent_optional_features() before calling WebKit.PermissionRequest.allow(). If the request is denied, no features are granted, regardless of what is set here.

Added in version 2.52.