summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-11 13:45:28 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-11 13:45:28 +0200
commitd6a599dbc9d824a462b2b206316e102bf8136446 (patch)
treeecb257a5e55b2239d74b90fdad62fccd661cf286 /Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
parent3ccc3a85f09a83557b391aae380d3bf5f81a2911 (diff)
downloadqtwebkit-d6a599dbc9d824a462b2b206316e102bf8136446.tar.gz
Imported WebKit commit 8ff1f22783a32de82fee915abd55bd1b298f2644 (http://svn.webkit.org/repository/webkit/trunk@122325)
New snapshot that should work with the latest Qt build system changes
Diffstat (limited to 'Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp')
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
index 372f46637..8a0625c07 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
@@ -162,11 +162,10 @@ WebKitWebContext* webkit_web_context_get_default(void)
* these caches, including various WebCore caches.
*
* Browsers can improve document load speed substantially by
- * specifying WEBKIT_CACHE_MODEL_WEB_BROWSER. Applications without a
+ * specifying %WEBKIT_CACHE_MODEL_WEB_BROWSER. Applications without a
* browsing interface can reduce memory usage substantially by
- * specifying WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. The default value is
- * WEBKIT_CACHE_MODEL_WEB_BROWSER.
- *
+ * specifying %WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. The default value is
+ * %WEBKIT_CACHE_MODEL_WEB_BROWSER.
*/
void webkit_web_context_set_cache_model(WebKitWebContext* context, WebKitCacheModel model)
{
@@ -221,6 +220,21 @@ WebKitCacheModel webkit_web_context_get_cache_model(WebKitWebContext* context)
return WEBKIT_CACHE_MODEL_WEB_BROWSER;
}
+/**
+ * webkit_web_context_clear_cache:
+ * @context: a #WebKitWebContext
+ *
+ * Clears all resources currently cached.
+ * See also webkit_web_context_set_cache_model().
+ */
+void webkit_web_context_clear_cache(WebKitWebContext* context)
+{
+ g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
+
+ WebKitWebContextPrivate* priv = context->priv;
+ WKResourceCacheManagerClearCacheForAllOrigins(WKContextGetResourceCacheManager(priv->context.get()), WKResourceCachesToClearAll);
+}
+
typedef HashMap<WKDownloadRef, GRefPtr<WebKitDownload> > DownloadsMap;
static DownloadsMap& downloadsMap()