From 6f0c6b15e006dc4ad85b2ea5e3b688164d335de1 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Thu, 21 Mar 2013 13:31:03 +0100 Subject: Move the clear cache method to EphyEmbedShell EphyEmbedSingle is almost dead! --- embed/ephy-embed-shell.c | 12 ++++++++++++ embed/ephy-embed-shell.h | 2 ++ embed/ephy-embed-single.c | 11 ----------- embed/ephy-embed-single.h | 2 -- 4 files changed, 14 insertions(+), 13 deletions(-) (limited to 'embed') diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c index b775075fc..e64fab833 100644 --- a/embed/ephy-embed-shell.c +++ b/embed/ephy-embed-shell.c @@ -856,3 +856,15 @@ ephy_embed_shell_get_web_extension_proxy (EphyEmbedShell *shell) return shell->priv->web_extension; } #endif + +/** + * ephy_embed_shell_clear_cache: + * @shell: an #EphyEmbedShell + * + * Clears the HTTP cache (temporarily saved web pages). + **/ +void +ephy_embed_shell_clear_cache (EphyEmbedShell *shell) +{ + webkit_web_context_clear_cache (webkit_web_context_get_default ()); +} diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h index 85e7df52c..67a60a7c2 100644 --- a/embed/ephy-embed-shell.h +++ b/embed/ephy-embed-shell.h @@ -102,6 +102,8 @@ gboolean ephy_embed_shell_launch_handler (EphyEmbedShell GFile *file, const char *mime_type, guint32 user_time); +void ephy_embed_shell_clear_cache (EphyEmbedShell *shell); + #ifdef HAVE_WEBKIT2 GDBusProxy *ephy_embed_shell_get_web_extension_proxy (EphyEmbedShell *shell); #endif diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c index d8af4fd2d..f9f8bc7c4 100644 --- a/embed/ephy-embed-single.c +++ b/embed/ephy-embed-single.c @@ -147,14 +147,3 @@ ephy_embed_single_initialize (EphyEmbedSingle *single) return TRUE; } -/** - * ephy_embed_single_clear_cache: - * @single: the #EphyEmbedSingle - * - * Clears the HTTP cache (temporarily saved web pages). - **/ -void -ephy_embed_single_clear_cache (EphyEmbedSingle *single) -{ - webkit_web_context_clear_cache (webkit_web_context_get_default ()); -} diff --git a/embed/ephy-embed-single.h b/embed/ephy-embed-single.h index 1e2b032de..517a0b09b 100644 --- a/embed/ephy-embed-single.h +++ b/embed/ephy-embed-single.h @@ -53,8 +53,6 @@ GType ephy_embed_single_get_type (void); gboolean ephy_embed_single_initialize (EphyEmbedSingle *single); -void ephy_embed_single_clear_cache (EphyEmbedSingle *single); - G_END_DECLS #endif -- cgit v1.2.3