summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-11-07 11:22:47 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-07 11:22:47 +0100
commitcfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch)
tree24d68c6f61c464ecba1e05670b80390ea3b0e50c /Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
parent69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff)
downloadqtwebkit-cfd86b747d32ac22246a1aa908eaa720c63a88c1.tar.gz
Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733)
New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes.
Diffstat (limited to 'Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp')
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
index ca60a5dc2..7707c70ab 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
@@ -179,7 +179,7 @@ static gpointer createDefaultWebContext(gpointer)
*
* Gets the default web context
*
- * Returns: (transfer none) a #WebKitWebContext
+ * Returns: (transfer none): a #WebKitWebContext
*/
WebKitWebContext* webkit_web_context_get_default(void)
{
@@ -290,7 +290,10 @@ static DownloadsMap& downloadsMap()
* @context: a #WebKitWebContext
* @uri: the URI to download
*
- * Requests downloading of the specified URI string.
+ * Requests downloading of the specified URI string. The download operation
+ * will not be associated to any #WebKitWebView, if you are interested in
+ * starting a download from a particular #WebKitWebView use
+ * webkit_web_view_download_uri() instead.
*
* Returns: (transfer full): a new #WebKitDownload representing the
* the download operation.
@@ -300,10 +303,7 @@ WebKitDownload* webkit_web_context_download_uri(WebKitWebContext* context, const
g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), 0);
g_return_val_if_fail(uri, 0);
- DownloadProxy* downloadProxy = context->priv->context->download(0, WebCore::ResourceRequest(String::fromUTF8(uri)));
- WebKitDownload* download = webkitDownloadCreate(downloadProxy);
- downloadsMap().set(downloadProxy, download);
- return download;
+ return webkitWebContextStartDownload(context, uri, 0);
}
/**
@@ -695,6 +695,14 @@ WebKitDownload* webkitWebContextGetOrCreateDownload(DownloadProxy* downloadProxy
return download.get();
}
+WebKitDownload* webkitWebContextStartDownload(WebKitWebContext* context, const char* uri, WebPageProxy* initiatingPage)
+{
+ DownloadProxy* downloadProxy = context->priv->context->download(initiatingPage, WebCore::ResourceRequest(String::fromUTF8(uri)));
+ WebKitDownload* download = webkitDownloadCreate(downloadProxy);
+ downloadsMap().set(downloadProxy, download);
+ return download;
+}
+
void webkitWebContextRemoveDownload(DownloadProxy* downloadProxy)
{
downloadsMap().remove(downloadProxy);