about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJosh Rickmar <jrick@conformal.com>2013-07-10 21:25:13 -0400
committerJosh Rickmar <jrick@conformal.com>2013-07-10 21:25:13 -0400
commit861c8a14b572ab474ea7f43686e56a763700c642 (patch)
treef38e94f81e5b967f7ff2f3cbca4d973f8fb2ee1b
parent6838ad2c8d9672eee8751c72c05b72a70e7d9934 (diff)
downloadxombrero-861c8a14b572ab474ea7f43686e56a763700c642.tar.gz
Add handler to always deny location requests.
-rw-r--r--xombrero.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xombrero.c b/xombrero.c
index 6e83e72..1602578 100644
--- a/xombrero.c
+++ b/xombrero.c
@@ -6692,6 +6692,13 @@ wv_popup_cb(WebKitWebView *wview, GtkMenu *menu, struct tab *t)
 }
 
 void
+wv_deny_location_cb(WebKitWebView *wv, WebKitWebFrame *frame,
+    WebKitGeolocationPolicyDecision *pd, struct tab *t)
+{
+	webkit_geolocation_policy_deny(pd);
+}
+
+void
 cmd_popup_cb(GtkEntry *entry, GtkMenu *menu, struct tab *t)
 {
 	/* popup menu enabled */
@@ -7872,6 +7879,7 @@ create_new_tab(const char *title, struct undo *u, int focus, int position)
 	    "signal::button_press_event", G_CALLBACK(wv_button_cb), t,
 	    "signal::button_release_event", G_CALLBACK(wv_release_button_cb), t,
 	    "signal::populate-popup", G_CALLBACK(wv_popup_cb), t,
+	    "signal::geolocation-policy-decision-requested", G_CALLBACK(wv_deny_location_cb), t,
 	    (char *)NULL);
 	g_signal_connect(t->wv,
 	    "notify::load-status", G_CALLBACK(notify_load_status_cb), t);