From 14fcf0d3193e2ee2bf904a305c9f34ff8d0e5ce7 Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Thu, 16 Oct 2014 04:47:32 -0700 Subject: Disable geolocation This prevents the crash when a webpage requests geolocation permission. Change-Id: I7331b869ec1439d678cee7941691289220718f3d Reviewed-by: Zeno Albisser --- src/core/content_browser_client_qt.cpp | 17 +++++++++++++++++ src/core/content_browser_client_qt.h | 7 +++++++ 2 files changed, 24 insertions(+) (limited to 'src/core') diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 28294dce7..3ead5314f 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -386,3 +386,20 @@ void ContentBrowserClientQt::AllowCertificateError(int render_process_id, int re QExplicitlySharedDataPointer errorController(new CertificateErrorController(new CertificateErrorControllerPrivate(cert_error, ssl_info, request_url, resource_type, overridable, strict_enforcement, callback))); contentsDelegate->allowCertificateError(errorController); } + +void ContentBrowserClientQt::RequestGeolocationPermission(content::WebContents *webContents, + int bridge_id, + const GURL &requesting_frame, + bool user_gesture, + base::Callback result_callback, + base::Closure *cancel_callback) +{ + Q_UNUSED(webContents); + Q_UNUSED(bridge_id); + Q_UNUSED(requesting_frame); + Q_UNUSED(user_gesture); + Q_UNUSED(cancel_callback); + + // TODO: Add geolocation support + result_callback.Run(false); +} diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h index 9cf1695fe..dd5d9f3a1 100644 --- a/src/core/content_browser_client_qt.h +++ b/src/core/content_browser_client_qt.h @@ -90,6 +90,13 @@ public: bool strict_enforcement, const base::Callback& callback, content::CertificateRequestResultType* result) Q_DECL_OVERRIDE; + virtual void RequestGeolocationPermission( + content::WebContents *webContents, + int bridge_id, + const GURL &requesting_frame, + bool user_gesture, + base::Callback result_callback, + base::Closure *cancel_callback) Q_DECL_OVERRIDE; BrowserContextQt* browser_context(); -- cgit v1.2.3