aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2013-03-25 22:22:12 +0800
committerTomas Popela <tpopela@redhat.com>2013-03-25 22:22:12 +0800
commit39e453466544e239ae63f7fadadf2d4e6141f3ca (patch)
tree0c6486677fb2a249638304b9def8d167da7f4053
parent929742a76f851411583717079d1013715930e4d2 (diff)
downloadgsoc2013-evolution-39e453466544e239ae63f7fadadf2d4e6141f3ca.tar
gsoc2013-evolution-39e453466544e239ae63f7fadadf2d4e6141f3ca.tar.gz
gsoc2013-evolution-39e453466544e239ae63f7fadadf2d4e6141f3ca.tar.bz2
gsoc2013-evolution-39e453466544e239ae63f7fadadf2d4e6141f3ca.tar.lz
gsoc2013-evolution-39e453466544e239ae63f7fadadf2d4e6141f3ca.tar.xz
gsoc2013-evolution-39e453466544e239ae63f7fadadf2d4e6141f3ca.tar.zst
gsoc2013-evolution-39e453466544e239ae63f7fadadf2d4e6141f3ca.zip
Bug #684245 - Disable 3rd-party browser plugins
-rw-r--r--e-util/e-web-view.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c
index d3f088ed83..862c414fe1 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);