WebKit2.XRPermissionRequest

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

Subclasses:

None

Methods

Inherited:

GObject.Object (37), WebKit2.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), WebKit2.PermissionRequest (2)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class WebKit2.XRPermissionRequest(**kwargs)
Bases:

GObject.Object, WebKit2.PermissionRequest

Abstract:

No

Structure:

WebKit2.XRPermissionRequestClass

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

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

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

New in version 2.52.

Returns:

a WebKit2.XRSessionFeatures flag combination

Return type:

WebKit2.XRSessionFeatures

Gets the optional features that need user consent.

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

New in version 2.52.

Returns:

a WebKit2.XRSessionFeatures flag combination

Return type:

WebKit2.XRSessionFeatures

Gets the required features that need user consent.

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

New in version 2.52.

get_granted_features()
Returns:

a WebKit2.XRSessionFeatures flag combination

Return type:

WebKit2.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.

New in version 2.52.

get_optional_features_requested()
Returns:

a WebKit2.XRSessionFeatures flag combination

Return type:

WebKit2.XRSessionFeatures

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

This includes both already granted features and those requiring consent.

New in version 2.52.

get_required_features_requested()
Returns:

a WebKit2.XRSessionFeatures flag combination

Return type:

WebKit2.XRSessionFeatures

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

This includes both already granted features and those requiring consent.

New in version 2.52.

get_security_origin()
Returns:

the WebKit2.SecurityOrigin that initiated the request

Return type:

WebKit2.SecurityOrigin

Gets the security origin that initiated the permission request.

New in version 2.52.

get_session_mode()
Returns:

a WebKit2.XRSessionMode

Return type:

WebKit2.XRSessionMode

Gets the session mode for which permission is being requested.

New in version 2.52.

set_granted_optional_features(granted)
Parameters:

granted (WebKit2.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 WebKit2.XRPermissionRequest.get_consent_optional_features() before calling WebKit2.PermissionRequest.allow(). If the request is denied, no features are granted, regardless of what is set here.

New in version 2.52.