aboutsummaryrefslogtreecommitdiffstats
path: root/embed/webkit/webkit-embed-single.c
diff options
context:
space:
mode:
Diffstat (limited to 'embed/webkit/webkit-embed-single.c')
-rw-r--r--embed/webkit/webkit-embed-single.c45
1 files changed, 14 insertions, 31 deletions
diff --git a/embed/webkit/webkit-embed-single.c b/embed/webkit/webkit-embed-single.c
index 2aa778c74..849d44127 100644
--- a/embed/webkit/webkit-embed-single.c
+++ b/embed/webkit/webkit-embed-single.c
@@ -20,11 +20,13 @@
#include "config.h"
#include <glib/gi18n.h>
#include <webkit/webkit.h>
+#include <libsoup/soup.h>
+#include <libsoup/soup-gnome.h>
#include "webkit-embed-single.h"
#include "webkit-embed-prefs.h"
#include "ephy-embed-single.h"
-#include "ephy-cookie-manager.h"
+#include "ephy-file-helpers.h"
#include "ephy-password-manager.h"
#include "ephy-permission-manager.h"
@@ -46,7 +48,6 @@ enum {
static void webkit_embed_single_class_init (WebKitEmbedSingleClass *klass);
static void webkit_embed_single_init (WebKitEmbedSingle *wes);
static void ephy_embed_single_iface_init (EphyEmbedSingleIface *iface);
-static void ephy_cookie_manager_iface_init (EphyCookieManagerIface *iface);
static void ephy_password_manager_iface_init (EphyPasswordManagerIface *iface);
static void ephy_permission_manager_iface_init (EphyPermissionManagerIface *iface);
@@ -61,8 +62,6 @@ static void ephy_certificate_manager_iface_init (EphyCertificateManagerIface *if
G_DEFINE_TYPE_WITH_CODE (WebKitEmbedSingle, webkit_embed_single, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_SINGLE,
ephy_embed_single_iface_init)
- G_IMPLEMENT_INTERFACE (EPHY_TYPE_COOKIE_MANAGER,
- ephy_cookie_manager_iface_init)
G_IMPLEMENT_INTERFACE (EPHY_TYPE_PASSWORD_MANAGER,
ephy_password_manager_iface_init)
G_IMPLEMENT_INTERFACE (EPHY_TYPE_CERTIFICATE_MANAGER,
@@ -73,8 +72,6 @@ G_DEFINE_TYPE_WITH_CODE (WebKitEmbedSingle, webkit_embed_single, G_TYPE_OBJECT,
G_DEFINE_TYPE_WITH_CODE (WebKitEmbedSingle, webkit_embed_single, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_SINGLE,
ephy_embed_single_iface_init)
- G_IMPLEMENT_INTERFACE (EPHY_TYPE_COOKIE_MANAGER,
- ephy_cookie_manager_iface_init)
G_IMPLEMENT_INTERFACE (EPHY_TYPE_PASSWORD_MANAGER,
ephy_password_manager_iface_init)
G_IMPLEMENT_INTERFACE (EPHY_TYPE_PERMISSION_MANAGER,
@@ -147,23 +144,6 @@ impl_get_font_list (EphyEmbedSingle *shell,
}
static GList *
-impl_list_cookies (EphyCookieManager *manager)
-{
- return NULL;
-}
-
-static void
-impl_remove_cookie (EphyCookieManager *manager,
- const EphyCookie *cookie)
-{
-}
-
-static void
-impl_clear_cookies (EphyCookieManager *manager)
-{
-}
-
-static GList *
impl_list_passwords (EphyPasswordManager *manager)
{
return NULL;
@@ -219,8 +199,19 @@ impl_permission_manager_test (EphyPermissionManager *manager,
static gboolean
impl_init (EphyEmbedSingle *esingle)
{
+ SoupSession *session;
+ SoupCookieJar *jar;
+ char *filename;
+
webkit_embed_prefs_init ();
+ filename = g_build_filename (ephy_dot_dir (), "cookies.sqlite", NULL);
+ jar = soup_cookie_jar_sqlite_new (filename, FALSE);
+ g_free (filename);
+
+ session = webkit_get_default_session ();
+ soup_session_add_feature (session, SOUP_SESSION_FEATURE(jar));
+
return TRUE;
}
@@ -332,14 +323,6 @@ ephy_embed_single_iface_init (EphyEmbedSingleIface *iface)
}
static void
-ephy_cookie_manager_iface_init (EphyCookieManagerIface *iface)
-{
- iface->list = impl_list_cookies;
- iface->remove = impl_remove_cookie;
- iface->clear = impl_clear_cookies;
-}
-
-static void
ephy_password_manager_iface_init (EphyPasswordManagerIface *iface)
{
iface->add = impl_add_password;