init_notification_permissions


Description:

[ CCode ( cname = "webkit_web_context_initialize_notification_permissions" ) ]
[ Version ( since = "2.16" ) ]
public void init_notification_permissions (List<SecurityOrigin> allowed_origins, List<SecurityOrigin> disallowed_origins)

Sets initial desktop notification permissions for the this.

allowed_origins and disallowed_origins must each be List of SecurityOrigin objects representing origins that will, respectively, either always or never have permission to show desktop notifications. No NotificationPermissionRequest will ever be generated for any of the security origins represented in allowed_origins or disallowed_origins. This function is necessary because some webpages proactively check whether they have permission to display notifications without ever creating a permission request.

This function only affects web processes that have not already been created. The best time to call it is when handling initialize_notification_permissions so as to ensure that new web processes receive the most recent set of permissions.

Parameters:

this

the WebContext

allowed_origins

a List of security origins

disallowed_origins

a List of security origins