[evolution] Bug #684245 - Disable 3rd-party browser plugins
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #684245 - Disable 3rd-party browser plugins
- Date: Mon, 25 Mar 2013 14:23:02 +0000 (UTC)
commit 39e453466544e239ae63f7fadadf2d4e6141f3ca
Author: Tomas Popela <tpopela redhat com>
Date: Mon Mar 25 15:22:12 2013 +0100
Bug #684245 - Disable 3rd-party browser plugins
e-util/e-web-view.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c
index d3f088e..862c414 100644
--- a/e-util/e-web-view.c
+++ b/e-util/e-web-view.c
@@ -1456,6 +1456,28 @@ web_view_drag_motion (GtkWidget *widget,
}
static void
+web_view_disable_webkit_3rd_party_plugins (void)
+{
+ WebKitWebPluginDatabase *database;
+ GSList *installed_plugins, *iterator;
+
+ database = webkit_get_web_plugin_database ();
+
+ if (!database)
+ return;
+
+ installed_plugins = webkit_web_plugin_database_get_plugins (database);
+
+ if (!installed_plugins)
+ return;
+
+ for (iterator = installed_plugins; iterator; iterator = iterator->next)
+ webkit_web_plugin_set_enabled (iterator->data, FALSE);
+
+ webkit_web_plugin_database_plugins_list_free (installed_plugins);
+}
+
+static void
e_web_view_class_init (EWebViewClass *class)
{
GObjectClass *object_class;
@@ -1660,6 +1682,8 @@ e_web_view_class_init (EWebViewClass *class)
e_marshal_BOOLEAN__STRING,
G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
+ web_view_disable_webkit_3rd_party_plugins ();
+
webkit_set_cache_model (WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER);
webkit_set_default_web_database_quota (0);
webkit_application_cache_set_maximum_size (0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]