diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:09:45 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:10:13 +0100 |
commit | 470286ecfe79d59df14944e5b5d34630fc739391 (patch) | |
tree | 43983212872e06cebefd2ae474418fa2908ca54c /Source/WebKit2/WebProcess/WebProcess.cpp | |
parent | 23037105e948c2065da5a937d3a2396b0ff45c1e (diff) | |
download | qtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz |
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebKit2/WebProcess/WebProcess.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/WebProcess.cpp | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/Source/WebKit2/WebProcess/WebProcess.cpp b/Source/WebKit2/WebProcess/WebProcess.cpp index 60fe731b9..28b7bfd7b 100644 --- a/Source/WebKit2/WebProcess/WebProcess.cpp +++ b/Source/WebKit2/WebProcess/WebProcess.cpp @@ -37,6 +37,7 @@ #include "WebCoreArgumentCoders.h" #include "WebDatabaseManager.h" #include "WebFrame.h" +#include "WebFrameNetworkingContext.h" #include "WebGeolocationManagerMessages.h" #include "WebKeyValueStorageManager.h" #include "WebMediaCacheManager.h" @@ -98,6 +99,10 @@ #include "NetscapePluginModule.h" #endif +#if ENABLE(CUSTOM_PROTOCOLS) +#include "CustomProtocolManager.h" +#endif + using namespace JSC; using namespace WebCore; @@ -183,12 +188,15 @@ void WebProcess::initialize(CoreIPC::Connection::Identifier serverIdentifier, Ru { ASSERT(!m_connection); - m_connection = WebConnectionToUIProcess::create(this, serverIdentifier, runLoop); + m_connection = CoreIPC::Connection::createClientConnection(serverIdentifier, this, runLoop); + m_connection->setDidCloseOnConnectionWorkQueueCallback(ChildProcess::didCloseOnConnectionWorkQueue); + m_connection->setShouldExitOnSyncMessageSendFailure(true); + m_connection->addQueueClient(&m_eventDispatcher); + m_connection->addQueueClient(this); + m_connection->open(); - m_connection->connection()->addQueueClient(&m_eventDispatcher); - m_connection->connection()->addQueueClient(this); + m_webConnection = WebConnectionToUIProcess::create(this); - m_connection->connection()->open(); m_runLoop = runLoop; startRandomCrashThreadIfRequested(); @@ -274,9 +282,9 @@ void WebProcess::initializeWebProcess(const WebProcessCreationParameters& parame if (parameters.shouldUseFontSmoothing) setShouldUseFontSmoothing(true); -#if PLATFORM(MAC) || USE(CFNETWORK) +#if (PLATFORM(MAC) || USE(CFNETWORK)) && !PLATFORM(WIN) // FIXME (NetworkProcess): Send this identifier to network process. - WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase(parameters.uiProcessBundleIdentifier); + WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase(parameters.uiProcessBundleIdentifier); #endif #if ENABLE(NETWORK_PROCESS) @@ -655,6 +663,9 @@ void WebProcess::terminate() m_connection->invalidate(); m_connection = nullptr; + m_webConnection->invalidate(); + m_webConnection = nullptr; + platformTerminate(); m_runLoop->stop(); } @@ -707,6 +718,13 @@ void WebProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes return; } +#if ENABLE(CUSTOM_PROTOCOLS) + if (messageID.is<CoreIPC::MessageClassCustomProtocolManager>()) { + CustomProtocolManager::shared().didReceiveMessage(connection, messageID, decoder); + return; + } +#endif + if (messageID.is<CoreIPC::MessageClassWebPageGroupProxy>()) { uint64_t pageGroupID = decoder.destinationID(); if (!pageGroupID) @@ -1139,4 +1157,16 @@ void WebProcess::didGetPlugins(CoreIPC::Connection*, uint64_t requestID, const V } #endif // ENABLE(PLUGIN_PROCESS) +#if ENABLE(CUSTOM_PROTOCOLS) +void WebProcess::registerSchemeForCustomProtocol(const WTF::String& scheme) +{ + CustomProtocolManager::shared().registerScheme(scheme); +} + +void WebProcess::unregisterSchemeForCustomProtocol(const WTF::String& scheme) +{ + CustomProtocolManager::shared().unregisterScheme(scheme); +} +#endif + } // namespace WebKit |