void QWebPermissionRequest::setAllow(bool accepted)
{
    d->allow = accepted;
    switch (type()) {
    case Geolocation: {
        if (accepted)
            WKGeolocationPermissionRequestAllow(d->geolocationRequest.get());
        else
            WKGeolocationPermissionRequestDeny(d->geolocationRequest.get());
        break;
    }
    case Notification: {
        if (accepted)
            WKNotificationPermissionRequestAllow(d->notificationRequest.get());
        else
            WKNotificationPermissionRequestDeny(d->notificationRequest.get());
        break;
    }
    default:
        ASSERT_NOT_REACHED();
    }

    deleteLater();
}
示例#2
0
void TestController::decidePolicyForNotificationPermissionRequest(WKPageRef, WKSecurityOriginRef, WKNotificationPermissionRequestRef request)
{
    WKNotificationPermissionRequestAllow(request);
}