summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/WebContext.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-16 14:51:15 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-16 14:51:15 +0200
commit4e6b3a206fa4ad8bb0b664f7674c9a70376d6e26 (patch)
tree7bb9ad7e31c24d1cf1707e03e6f1a80f6d033951 /Source/WebKit2/UIProcess/WebContext.cpp
parent3977e3d2f72f7fe2c887c1ec0e0c342e1d169f42 (diff)
downloadqtwebkit-4e6b3a206fa4ad8bb0b664f7674c9a70376d6e26.tar.gz
Imported WebKit commit 953baa67aa07087b6ecd4199351ec554c724e27d (http://svn.webkit.org/repository/webkit/trunk@122676)
Diffstat (limited to 'Source/WebKit2/UIProcess/WebContext.cpp')
-rw-r--r--Source/WebKit2/UIProcess/WebContext.cpp36
1 files changed, 34 insertions, 2 deletions
diff --git a/Source/WebKit2/UIProcess/WebContext.cpp b/Source/WebKit2/UIProcess/WebContext.cpp
index 5c55636d6..381a25603 100644
--- a/Source/WebKit2/UIProcess/WebContext.cpp
+++ b/Source/WebKit2/UIProcess/WebContext.cpp
@@ -70,6 +70,10 @@
#include "WebBatteryManagerProxy.h"
#endif
+#if ENABLE(NETWORK_INFO)
+#include "WebNetworkInfoManagerProxy.h"
+#endif
+
#if USE(SOUP)
#include "WebSoupRequestManagerProxy.h"
#endif
@@ -143,6 +147,9 @@ WebContext::WebContext(ProcessModel processModel, const String& injectedBundlePa
, m_iconDatabase(WebIconDatabase::create(this))
, m_keyValueStorageManagerProxy(WebKeyValueStorageManagerProxy::create(this))
, m_mediaCacheManagerProxy(WebMediaCacheManagerProxy::create(this))
+#if ENABLE(NETWORK_INFO)
+ , m_networkInfoManagerProxy(WebNetworkInfoManagerProxy::create(this))
+#endif
, m_notificationManagerProxy(WebNotificationManagerProxy::create(this))
, m_pluginSiteDataManager(WebPluginSiteDataManager::create(this))
, m_resourceCacheManagerProxy(WebResourceCacheManagerProxy::create(this))
@@ -210,6 +217,11 @@ WebContext::~WebContext()
m_mediaCacheManagerProxy->invalidate();
m_mediaCacheManagerProxy->clearContext();
+
+#if ENABLE(NETWORK_INFO)
+ m_networkInfoManagerProxy->invalidate();
+ m_networkInfoManagerProxy->clearContext();
+#endif
m_notificationManagerProxy->invalidate();
m_notificationManagerProxy->clearContext();
@@ -418,6 +430,9 @@ void WebContext::disconnectProcess(WebProcessProxy* process)
m_geolocationManagerProxy->invalidate();
m_keyValueStorageManagerProxy->invalidate();
m_mediaCacheManagerProxy->invalidate();
+#if ENABLE(NETWORK_INFO)
+ m_networkInfoManagerProxy->invalidate();
+#endif
m_notificationManagerProxy->invalidate();
m_resourceCacheManagerProxy->invalidate();
#if USE(SOUP)
@@ -782,6 +797,13 @@ void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes
m_mediaCacheManagerProxy->didReceiveMessage(connection, messageID, arguments);
return;
}
+
+#if ENABLE(NETWORK_INFO)
+ if (messageID.is<CoreIPC::MessageClassWebNetworkInfoManagerProxy>()) {
+ m_networkInfoManagerProxy->didReceiveMessage(connection, messageID, arguments);
+ return;
+ }
+#endif
if (messageID.is<CoreIPC::MessageClassWebNotificationManagerProxy>()) {
m_notificationManagerProxy->didReceiveMessage(connection, messageID, arguments);
@@ -835,6 +857,13 @@ void WebContext::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC:
m_iconDatabase->didReceiveSyncMessage(connection, messageID, arguments, reply);
return;
}
+
+#if ENABLE(NETWORK_INFO)
+ if (messageID.is<CoreIPC::MessageClassWebNetworkInfoManagerProxy>()) {
+ m_networkInfoManagerProxy->didReceiveSyncMessage(connection, messageID, arguments, reply);
+ return;
+ }
+#endif
switch (messageID.get<WebContextLegacyMessage::Kind>()) {
case WebContextLegacyMessage::PostSynchronousMessage: {
@@ -940,9 +969,12 @@ bool WebContext::httpPipeliningEnabled() const
#endif
}
-void WebContext::getWebCoreStatistics(PassRefPtr<DictionaryCallback> prpCallback)
+void WebContext::getWebCoreStatistics(PassRefPtr<DictionaryCallback> callback)
{
- RefPtr<DictionaryCallback> callback = prpCallback;
+ if (!m_process) {
+ callback->invalidate();
+ return;
+ }
uint64_t callbackID = callback->callbackID();
m_dictionaryCallbacks.set(callbackID, callback.get());