diff options
Diffstat (limited to 'WebKit/android/WebCoreSupport/GeolocationPermissions.cpp')
-rwxr-xr-x | WebKit/android/WebCoreSupport/GeolocationPermissions.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp b/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp index ca84f17..1462ce2 100755 --- a/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp +++ b/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp @@ -43,6 +43,7 @@ namespace android { // the browser closes and read them on startup. GeolocationPermissions::PermissionsMap GeolocationPermissions::s_permanentPermissions; GeolocationPermissions::GeolocationPermissionsVector GeolocationPermissions::s_instances; +bool GeolocationPermissions::s_alwaysDeny = false; GeolocationPermissions::GeolocationPermissions(WebViewCore* webViewCore, Frame* mainFrame) : m_webViewCore(webViewCore) @@ -66,6 +67,12 @@ void GeolocationPermissions::queryPermissionState(Frame* frame) // the SecurityOrigin pointer for equality is insufficient. String originString = frame->document()->securityOrigin()->toString(); + // If we've been told to always deny requests, do so. + if (s_alwaysDeny) { + makeAsynchronousCallbackToGeolocation(originString, false); + return; + } + // See if we have a record for this origin in the temporary permissions for // this tab. These take precedence over permanent permissions. PermissionsMap::const_iterator iter = m_temporaryPermissions.find(originString); @@ -243,4 +250,9 @@ void GeolocationPermissions::clearAll() s_permanentPermissions.clear(); } +void GeolocationPermissions::setAlwaysDeny(bool deny) +{ + s_alwaysDeny = deny; +} + } // namespace android |