void WebProcessConnection::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder, std::unique_ptr<CoreIPC::MessageEncoder>& replyEncoder) { // Force all timers to run at full speed when processing a synchronous message ActivityAssertion activityAssertion(PluginProcess::shared()); ConnectionStack::CurrentConnectionPusher currentConnection(ConnectionStack::shared(), connection); uint64_t destinationID = decoder.destinationID(); if (!destinationID) { didReceiveSyncWebProcessConnectionMessage(connection, decoder, replyEncoder); return; } if (decoder.messageReceiverName() == Messages::NPObjectMessageReceiver::messageReceiverName()) { m_npRemoteObjectMap->didReceiveSyncMessage(connection, decoder, replyEncoder); return; } PluginControllerProxy* pluginControllerProxy = m_pluginControllers.get(decoder.destinationID()); if (!pluginControllerProxy) return; PluginController::PluginDestructionProtector protector(pluginControllerProxy->asPluginController()); pluginControllerProxy->didReceiveSyncPluginControllerProxyMessage(connection, decoder, replyEncoder); }
void PluginProcessConnection::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder) { ASSERT(decoder.destinationID()); PluginProxy* pluginProxy = m_plugins.get(decoder.destinationID()); if (!pluginProxy) return; pluginProxy->didReceivePluginProxyMessage(connection, messageID, decoder); }
void WebProcessProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder) { if (m_messageReceiverMap.dispatchMessage(connection, messageID, decoder)) return; if (m_context->dispatchMessage(connection, messageID, decoder)) return; if (messageID.is<CoreIPC::MessageClassWebProcessProxy>()) { didReceiveWebProcessProxyMessage(connection, messageID, decoder); return; } #if ENABLE(CUSTOM_PROTOCOLS) if (messageID.is<CoreIPC::MessageClassCustomProtocolManagerProxy>()) { m_customProtocolManagerProxy.didReceiveMessage(connection, messageID, decoder); return; } #endif uint64_t pageID = decoder.destinationID(); if (!pageID) return; WebPageProxy* pageProxy = webPage(pageID); if (!pageProxy) return; pageProxy->didReceiveMessage(connection, messageID, decoder); }
void NPRemoteObjectMap::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder, std::unique_ptr<CoreIPC::MessageEncoder>& replyEncoder) { NPObjectMessageReceiver* messageReceiver = m_registeredNPObjects.get(decoder.destinationID()); if (!messageReceiver) return; messageReceiver->didReceiveSyncNPObjectMessageReceiverMessage(connection, decoder, replyEncoder); }
void WebProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder) { if (m_messageReceiverMap.dispatchMessage(connection, messageID, decoder)) return; if (messageID.is<CoreIPC::MessageClassWebProcess>()) { didReceiveWebProcessMessage(connection, messageID, decoder); return; } if (messageID.is<CoreIPC::MessageClassWebApplicationCacheManager>()) { WebApplicationCacheManager::shared().didReceiveMessage(connection, messageID, decoder); return; } if (messageID.is<CoreIPC::MessageClassWebCookieManager>()) { WebCookieManager::shared().didReceiveMessage(connection, messageID, decoder); return; } #if ENABLE(SQL_DATABASE) if (messageID.is<CoreIPC::MessageClassWebDatabaseManager>()) { WebDatabaseManager::shared().didReceiveMessage(connection, messageID, decoder); return; } #endif if (messageID.is<CoreIPC::MessageClassWebKeyValueStorageManager>()) { WebKeyValueStorageManager::shared().didReceiveMessage(connection, messageID, decoder); return; } if (messageID.is<CoreIPC::MessageClassWebMediaCacheManager>()) { WebMediaCacheManager::shared().didReceiveMessage(connection, messageID, decoder); return; } if (messageID.is<CoreIPC::MessageClassWebResourceCacheManager>()) { WebResourceCacheManager::shared().didReceiveMessage(connection, messageID, decoder); return; } if (messageID.is<CoreIPC::MessageClassWebPageGroupProxy>()) { uint64_t pageGroupID = decoder.destinationID(); if (!pageGroupID) return; WebPageGroupProxy* pageGroupProxy = webPageGroup(pageGroupID); if (!pageGroupProxy) return; pageGroupProxy->didReceiveMessage(connection, messageID, decoder); } }
void WebProcessConnection::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder) { ConnectionStack::CurrentConnectionPusher currentConnection(ConnectionStack::shared(), connection); if (decoder.messageReceiverName() == Messages::WebProcessConnection::messageReceiverName()) { didReceiveWebProcessConnectionMessage(connection, decoder); return; } if (!decoder.destinationID()) { ASSERT_NOT_REACHED(); return; } PluginControllerProxy* pluginControllerProxy = m_pluginControllers.get(decoder.destinationID()); if (!pluginControllerProxy) return; PluginController::PluginDestructionProtector protector(pluginControllerProxy->asPluginController()); pluginControllerProxy->didReceivePluginControllerProxyMessage(connection, decoder); }
void WebProcessConnection::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder, OwnPtr<CoreIPC::MessageEncoder>& replyEncoder) { ConnectionStack::CurrentConnectionPusher currentConnection(ConnectionStack::shared(), connection); uint64_t destinationID = decoder.destinationID(); if (!destinationID) { didReceiveSyncWebProcessConnectionMessage(connection, messageID, decoder, replyEncoder); return; } if (messageID.is<CoreIPC::MessageClassNPObjectMessageReceiver>()) { m_npRemoteObjectMap->didReceiveSyncMessage(connection, messageID, decoder, replyEncoder); return; } PluginControllerProxy* pluginControllerProxy = m_pluginControllers.get(decoder.destinationID()); if (!pluginControllerProxy) return; PluginController::PluginDestructionProtector protector(pluginControllerProxy->asPluginController()); pluginControllerProxy->didReceiveSyncPluginControllerProxyMessage(connection, messageID, decoder, replyEncoder); }
void DatabaseToWebProcessConnection::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder) { if (decoder.messageReceiverName() == Messages::DatabaseToWebProcessConnection::messageReceiverName()) { didReceiveDatabaseToWebProcessConnectionMessage(connection, decoder); return; } if (decoder.messageReceiverName() == Messages::DatabaseProcessIDBConnection::messageReceiverName()) { IDBConnectionMap::iterator backendIterator = m_idbConnections.find(decoder.destinationID()); if (backendIterator != m_idbConnections.end()) backendIterator->value->didReceiveDatabaseProcessIDBConnectionMessage(connection, decoder); return; } ASSERT_NOT_REACHED(); }
void PluginProcessConnection::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder, OwnPtr<CoreIPC::MessageEncoder>& replyEncoder) { if (messageID.is<CoreIPC::MessageClassNPObjectMessageReceiver>()) { m_npRemoteObjectMap->didReceiveSyncMessage(connection, messageID, decoder, replyEncoder); return; } uint64_t destinationID = decoder.destinationID(); if (!destinationID) { didReceiveSyncPluginProcessConnectionMessage(connection, messageID, decoder, replyEncoder); return; } PluginProxy* pluginProxy = m_plugins.get(destinationID); if (!pluginProxy) return; pluginProxy->didReceiveSyncPluginProxyMessage(connection, messageID, decoder, replyEncoder); }
void WebProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder) { if (messageReceiverMap().dispatchMessage(connection, decoder)) return; if (decoder.messageReceiverName() == Messages::WebProcess::messageReceiverName()) { didReceiveWebProcessMessage(connection, decoder); return; } if (decoder.messageReceiverName() == Messages::WebPageGroupProxy::messageReceiverName()) { uint64_t pageGroupID = decoder.destinationID(); if (!pageGroupID) return; WebPageGroupProxy* pageGroupProxy = webPageGroup(pageGroupID); if (!pageGroupProxy) return; pageGroupProxy->didReceiveMessage(connection, decoder); } }
void WebProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder) { if (messageReceiverMap().dispatchMessage(connection, messageID, decoder)) return; if (messageID.is<CoreIPC::MessageClassWebProcess>()) { didReceiveWebProcessMessage(connection, messageID, decoder); return; } if (messageID.is<CoreIPC::MessageClassWebPageGroupProxy>()) { uint64_t pageGroupID = decoder.destinationID(); if (!pageGroupID) return; WebPageGroupProxy* pageGroupProxy = webPageGroup(pageGroupID); if (!pageGroupProxy) return; pageGroupProxy->didReceiveMessage(connection, messageID, decoder); } }
void WebProcessProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder, OwnPtr<CoreIPC::MessageEncoder>& replyEncoder) { if (m_messageReceiverMap.dispatchSyncMessage(connection, messageID, decoder, replyEncoder)) return; if (m_context->dispatchSyncMessage(connection, messageID, decoder, replyEncoder)) return; if (messageID.is<CoreIPC::MessageClassWebProcessProxy>()) { didReceiveSyncWebProcessProxyMessage(connection, messageID, decoder, replyEncoder); return; } uint64_t pageID = decoder.destinationID(); if (!pageID) return; WebPageProxy* pageProxy = webPage(pageID); if (!pageProxy) return; pageProxy->didReceiveSyncMessage(connection, messageID, decoder, replyEncoder); }
void NetworkProcessConnection::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder, OwnPtr<CoreIPC::MessageEncoder>& replyEncoder) { if (decoder.messageReceiverName() == Messages::WebResourceLoader::messageReceiverName()) { if (WebResourceLoader* webResourceLoader = WebProcess::shared().webResourceLoadScheduler().webResourceLoaderForIdentifier(decoder.destinationID())) webResourceLoader->didReceiveSyncWebResourceLoaderMessage(connection, decoder, replyEncoder); return; } ASSERT_NOT_REACHED(); }
void NetworkConnectionToWebProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder) { if (decoder.messageReceiverName() == Messages::NetworkConnectionToWebProcess::messageReceiverName()) { didReceiveNetworkConnectionToWebProcessMessage(connection, decoder); return; } if (decoder.messageReceiverName() == Messages::NetworkResourceLoader::messageReceiverName()) { HashMap<ResourceLoadIdentifier, RefPtr<NetworkResourceLoader>>::iterator loaderIterator = m_networkResourceLoaders.find(decoder.destinationID()); if (loaderIterator != m_networkResourceLoaders.end()) loaderIterator->value->didReceiveNetworkResourceLoaderMessage(connection, decoder); return; } ASSERT_NOT_REACHED(); }
void NetworkProcessConnection::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder) { if (decoder.messageReceiverName() == Messages::WebResourceLoader::messageReceiverName()) { if (WebResourceLoader* webResourceLoader = WebProcess::shared().webResourceLoadScheduler().webResourceLoaderForIdentifier(decoder.destinationID())) webResourceLoader->didReceiveWebResourceLoaderMessage(connection, decoder); return; } didReceiveNetworkProcessConnectionMessage(connection, decoder); }
void WebToDatabaseProcessConnection::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder) { if (decoder.messageReceiverName() == Messages::WebIDBServerConnection::messageReceiverName()) { HashMap<uint64_t, WebIDBServerConnection*>::iterator connectionIterator = m_webIDBServerConnections.find(decoder.destinationID()); if (connectionIterator != m_webIDBServerConnections.end()) connectionIterator->value->didReceiveWebIDBServerConnectionMessage(connection, decoder); return; } ASSERT_NOT_REACHED(); }
void NetworkConnectionToWebProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder) { if (messageID.is<CoreIPC::MessageClassNetworkConnectionToWebProcess>()) { didReceiveNetworkConnectionToWebProcessMessage(connection, messageID, decoder); return; } if (messageID.is<CoreIPC::MessageClassNetworkResourceLoader>()) { NetworkResourceLoader* loader = NetworkProcess::shared().networkResourceLoadScheduler().networkResourceLoaderForIdentifier(decoder.destinationID()); if (loader) loader->didReceiveNetworkResourceLoaderMessage(connection, messageID, decoder); return; } ASSERT_NOT_REACHED(); }