diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
commit | cfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch) | |
tree | 24d68c6f61c464ecba1e05670b80390ea3b0e50c /Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp | |
parent | 69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff) | |
download | qtwebkit-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.cpp | 20 |
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); |