diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp b/Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp index f17ac6cee..54c8df3e0 100644 --- a/Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp +++ b/Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp @@ -27,17 +27,17 @@ #include "config.h" #include "WebProcessMainGtk.h" -#define LIBSOUP_USE_UNSTABLE_REQUEST_API - #include "WKBase.h" +#include "WebKit2Initialize.h" +#include <WebCore/AuthenticationChallenge.h> +#include <WebCore/NetworkingContext.h> #include <WebCore/ResourceHandle.h> #include <WebCore/RunLoop.h> #include <WebKit2/WebProcess.h> #include <gtk/gtk.h> -#include <libsoup/soup-cache.h> -#include <runtime/InitializeThreading.h> +#include <libintl.h> +#include <libsoup/soup.h> #include <unistd.h> -#include <wtf/MainThread.h> #include <wtf/gobject/GOwnPtr.h> #include <wtf/gobject/GRefPtr.h> @@ -55,14 +55,18 @@ WK_EXPORT int WebProcessMainGtk(int argc, char* argv[]) #endif gtk_init(&argc, &argv); - g_type_init(); - JSC::initializeThreading(); - WTF::initializeMainThread(); + bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); + bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); + + InitializeWebKit2(); - RunLoop::initializeMainRunLoop(); int socket = atoi(argv[1]); - WebProcess::shared().initialize(socket, RunLoop::main()); + + ChildProcessInitializationParameters parameters; + parameters.connectionIdentifier = socket; + + WebProcess::shared().initialize(parameters); // Despite using system CAs to validate certificates we're // accepting invalid certificates by default. New API will be @@ -71,18 +75,12 @@ WK_EXPORT int WebProcessMainGtk(int argc, char* argv[]) g_object_set(session, SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE, SOUP_SESSION_SSL_STRICT, FALSE, NULL); - GOwnPtr<char> soupCacheDirectory(g_build_filename(g_get_user_cache_dir(), g_get_prgname(), NULL)); - GRefPtr<SoupCache> soupCache = adoptGRef(soup_cache_new(soupCacheDirectory.get(), SOUP_CACHE_SINGLE_USER)); - soup_session_add_feature(session, SOUP_SESSION_FEATURE(soupCache.get())); - soup_cache_load(soupCache.get()); - - // This is for compatibility, it will be removed when UI process can handle SSL errors. - WebCore::ResourceHandle::setIgnoreSSLErrors(true); - RunLoop::run(); - soup_cache_flush(soupCache.get()); - soup_cache_dump(soupCache.get()); + if (SoupSessionFeature* soupCache = soup_session_get_feature(session, SOUP_TYPE_CACHE)) { + soup_cache_flush(SOUP_CACHE(soupCache)); + soup_cache_dump(SOUP_CACHE(soupCache)); + } return 0; } |