void PluginProcessProxy::didFinishLaunching(ProcessLauncher*, CoreIPC::Connection::Identifier connectionIdentifier) { ASSERT(!m_connection); if (CoreIPC::Connection::identifierIsNull(connectionIdentifier)) { pluginProcessCrashedOrFailedToLaunch(); return; } m_connection = CoreIPC::Connection::createServerConnection(connectionIdentifier, this, RunLoop::main()); #if PLATFORM(MAC) m_connection->setShouldCloseConnectionOnMachExceptions(); #elif PLATFORM(QT) m_connection->setShouldCloseConnectionOnProcessTermination(processIdentifier()); #endif m_connection->open(); PluginProcessCreationParameters parameters; parameters.processType = m_pluginProcessAttributes.processType; if (parameters.processType == PluginProcessTypeSnapshot) { parameters.minimumLifetime = snapshottingMinimumLifetime; parameters.terminationTimeout = snapshottingShutdownTimeout; } else { parameters.minimumLifetime = minimumLifetime; parameters.terminationTimeout = shutdownTimeout; } platformInitializePluginProcess(parameters); // Initialize the plug-in host process. m_connection->send(Messages::PluginProcess::InitializePluginProcess(parameters), 0); // Send all our pending requests. for (size_t i = 0; i < m_pendingGetSitesRequests.size(); ++i) m_connection->send(Messages::PluginProcess::GetSitesWithData(m_pendingGetSitesRequests[i]), 0); m_pendingGetSitesRequests.clear(); for (size_t i = 0; i < m_pendingClearSiteDataRequests.size(); ++i) { const ClearSiteDataRequest& request = m_pendingClearSiteDataRequests[i]; m_connection->send(Messages::PluginProcess::ClearSiteData(request.sites, request.flags, request.maxAgeInSeconds, request.callbackID), 0); } m_pendingClearSiteDataRequests.clear(); for (unsigned i = 0; i < m_numPendingConnectionRequests; ++i) m_connection->send(Messages::PluginProcess::CreateWebProcessConnection(), 0); m_numPendingConnectionRequests = 0; #if PLATFORM(MAC) if (WebContext::canEnableProcessSuppressionForGlobalChildProcesses()) setProcessSuppressionEnabled(true); #endif }
void PropertyBrowser::processObject(IScaObject *object) { QtProperty *property; property = m_stringManager->addProperty(PROPERTY_TYPE); m_stringManager->setReadOnly(property, true); m_stringManager->setValue(property, object->getTypeName()); addProperty(property, PROPERTY_TYPE); if (object->getType() != IScaObject::LINK) { property = m_stringManager->addProperty(PROPERTY_FILEPATH); m_stringManager->setValue(property, object->getFile().absoluteFilePath()); addProperty(property, PROPERTY_FILEPATH); } property = m_stringManager->addProperty(PROPERTY_ANNOTATION); m_stringManager->setValue(property, object->getAnnotation()); addProperty(property, PROPERTY_ANNOTATION); switch (object->getType()) { case IScaObject::BINARYBLOCK: processBinaryBlock(static_cast<IScaObjectBinaryBlock *>(object)); break; case IScaObject::IDENTIFIER: processIdentifier(static_cast<IScaObjectIdentifier *>(object)); break; case IScaObject::TEXTBLOCK: processTextBlock(static_cast<IScaObjectTextBlock *>(object)); break; case IScaObject::SYMBOL: processSymbol(static_cast<IScaObjectSymbol *>(object)); break; case IScaObject::LINE: processLine(static_cast<IScaObjectLine *>(object)); break; case IScaObject::LINK: processLink(static_cast<Link *>(object)); break; default: qDebug() << "[PropertyManager]: unknown type while processing, " << object->getType(); break; } }
void ChildProcessProxy::didFinishLaunching(ProcessLauncher*, CoreIPC::Connection::Identifier connectionIdentifier) { ASSERT(!m_connection); m_connection = CoreIPC::Connection::createServerConnection(connectionIdentifier, this, RunLoop::main()); #if OS(DARWIN) m_connection->setShouldCloseConnectionOnMachExceptions(); #elif PLATFORM(QT) && !OS(WINDOWS) m_connection->setShouldCloseConnectionOnProcessTermination(processIdentifier()); #endif connectionWillOpen(m_connection.get()); m_connection->open(); for (size_t i = 0; i < m_pendingMessages.size(); ++i) { OwnPtr<CoreIPC::MessageEncoder> message = m_pendingMessages[i].first.release(); unsigned messageSendFlags = m_pendingMessages[i].second; m_connection->sendMessage(message.release(), messageSendFlags); } m_pendingMessages.clear(); }