static void webkitGeolocationPermissionRequestAllow(WebKitPermissionRequest* request) { ASSERT(WEBKIT_IS_GEOLOCATION_PERMISSION_REQUEST(request)); WebKitGeolocationPermissionRequestPrivate* priv = WEBKIT_GEOLOCATION_PERMISSION_REQUEST(request)->priv; // Only one decision at a time. if (priv->madeDecision) return; WKGeolocationPermissionRequestAllow(priv->wkRequest.get()); priv->madeDecision = true; }
void TestController::decidePolicyForGeolocationPermissionRequestIfPossible() { if (!m_isGeolocationPermissionSet) return; for (size_t i = 0; i < m_geolocationPermissionRequests.size(); ++i) { WKGeolocationPermissionRequestRef permissionRequest = m_geolocationPermissionRequests[i].get(); if (m_isGeolocationPermissionAllowed) WKGeolocationPermissionRequestAllow(permissionRequest); else WKGeolocationPermissionRequestDeny(permissionRequest); } m_geolocationPermissionRequests.clear(); }
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(); }
void decidePolicyForGeolocationPermissionRequestCallBack(WKPageRef page, WKFrameRef frame, WKSecurityOriginRef origin, WKGeolocationPermissionRequestRef permissionRequest, const void* clientInfo) { WKGeolocationPermissionRequestAllow(permissionRequest); }