本文整理汇总了C++中parentProcessConnection函数的典型用法代码示例。如果您正苦于以下问题:C++ parentProcessConnection函数的具体用法?C++ parentProcessConnection怎么用?C++ parentProcessConnection使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了parentProcessConnection函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: USE
void NetworkProcess::createNetworkConnectionToWebProcess()
{
#if USE(UNIX_DOMAIN_SOCKETS)
IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
RefPtr<NetworkConnectionToWebProcess> connection = NetworkConnectionToWebProcess::create(socketPair.server);
m_webProcessConnections.append(connection.release());
IPC::Attachment clientSocket(socketPair.client);
parentProcessConnection()->send(Messages::NetworkProcessProxy::DidCreateNetworkConnectionToWebProcess(clientSocket), 0);
#elif OS(DARWIN)
// Create the listening port.
mach_port_t listeningPort;
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
// Create a listening connection.
RefPtr<NetworkConnectionToWebProcess> connection = NetworkConnectionToWebProcess::create(IPC::Connection::Identifier(listeningPort));
m_webProcessConnections.append(connection.release());
IPC::Attachment clientPort(listeningPort, MACH_MSG_TYPE_MAKE_SEND);
parentProcessConnection()->send(Messages::NetworkProcessProxy::DidCreateNetworkConnectionToWebProcess(clientPort), 0);
#else
notImplemented();
#endif
}
开发者ID:valbok,项目名称:WebKitForWayland,代码行数:25,代码来源:NetworkProcess.cpp
示例2: parentProcessConnection
void NetworkProcess::logDiagnosticMessageWithResult(uint64_t webPageID, const String& message, const String& description, WebCore::DiagnosticLoggingResultType result, WebCore::ShouldSample shouldSample)
{
if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample))
return;
parentProcessConnection()->send(Messages::NetworkProcessProxy::LogSampledDiagnosticMessageWithResult(webPageID, message, description, result), 0);
}
开发者ID:josedealcala,项目名称:webkit,代码行数:7,代码来源:NetworkProcess.cpp
示例3: hashForPlugInOrigin
void WebProcess::plugInDidReceiveUserInteraction(const String& pageOrigin, const String& pluginOrigin, const String& mimeType, SessionID sessionID)
{
if (pageOrigin.isEmpty())
return;
unsigned plugInOriginHash = hashForPlugInOrigin(pageOrigin, pluginOrigin, mimeType);
if (!plugInOriginHash)
return;
HashMap<WebCore::SessionID, HashMap<unsigned, double>>::const_iterator sessionIterator = m_plugInAutoStartOriginHashes.find(sessionID);
HashMap<unsigned, double>::const_iterator it;
bool contains = false;
if (sessionIterator != m_plugInAutoStartOriginHashes.end()) {
it = sessionIterator->value.find(plugInOriginHash);
contains = it != sessionIterator->value.end();
}
if (!contains) {
sessionIterator = m_plugInAutoStartOriginHashes.find(SessionID::defaultSessionID());
it = sessionIterator->value.find(plugInOriginHash);
if (it == sessionIterator->value.end())
return;
}
if (it->value - currentTime() > plugInAutoStartExpirationTimeUpdateThreshold)
return;
parentProcessConnection()->send(Messages::WebProcessPool::PlugInDidReceiveUserInteraction(plugInOriginHash, sessionID), 0);
}
开发者ID:GaoHuijian,项目名称:webkit,代码行数:28,代码来源:WebProcess.cpp
示例4: ensureNetworkProcessConnection
void WebProcess::ensureNetworkProcessConnection()
{
if (!m_usesNetworkProcess)
return;
if (m_networkProcessConnection)
return;
IPC::Attachment encodedConnectionIdentifier;
if (!parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetNetworkProcessConnection(),
Messages::WebProcessProxy::GetNetworkProcessConnection::Reply(encodedConnectionIdentifier), 0))
return;
#if OS(DARWIN)
IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.port());
#elif USE(UNIX_DOMAIN_SOCKETS)
IPC::Connection::Identifier connectionIdentifier = encodedConnectionIdentifier.releaseFileDescriptor();
#else
ASSERT_NOT_REACHED();
#endif
if (IPC::Connection::identifierIsNull(connectionIdentifier))
return;
m_networkProcessConnection = NetworkProcessConnection::create(connectionIdentifier);
}
开发者ID:GaoHuijian,项目名称:webkit,代码行数:25,代码来源:WebProcess.cpp
示例5: CallbackAggregator
void DatabaseProcess::deleteWebsiteData(WebCore::SessionID, uint64_t websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
{
struct CallbackAggregator final : public ThreadSafeRefCounted<CallbackAggregator> {
explicit CallbackAggregator(std::function<void ()> completionHandler)
: m_completionHandler(WTFMove(completionHandler))
{
}
~CallbackAggregator()
{
ASSERT(RunLoop::isMain());
RunLoop::main().dispatch(WTFMove(m_completionHandler));
}
std::function<void ()> m_completionHandler;
};
RefPtr<CallbackAggregator> callbackAggregator = adoptRef(new CallbackAggregator([this, callbackID]() {
parentProcessConnection()->send(Messages::DatabaseProcessProxy::DidDeleteWebsiteData(callbackID), 0);
}));
#if ENABLE(INDEXED_DATABASE)
if (websiteDataTypes & WebsiteDataTypeIndexedDBDatabases) {
postDatabaseTask(std::make_unique<CrossThreadTask>([this, callbackAggregator, modifiedSince] {
deleteIndexedDatabaseEntriesModifiedSince(modifiedSince);
RunLoop::main().dispatch([callbackAggregator] { });
}));
}
#endif
}
开发者ID:valbok,项目名称:WebKitForWayland,代码行数:32,代码来源:DatabaseProcess.cpp
示例6: PLATFORM
void NetworkProcess::deleteWebsiteData(SessionID sessionID, uint64_t websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
{
#if PLATFORM(COCOA)
if (websiteDataTypes & WebsiteDataTypeHSTSCache) {
if (auto* networkStorageSession = SessionTracker::storageSession(sessionID))
clearHSTSCache(*networkStorageSession, modifiedSince);
}
#endif
if (websiteDataTypes & WebsiteDataTypeCookies) {
if (auto* networkStorageSession = SessionTracker::storageSession(sessionID))
deleteAllCookiesModifiedSince(*networkStorageSession, modifiedSince);
}
auto completionHandler = [this, callbackID] {
parentProcessConnection()->send(Messages::NetworkProcessProxy::DidDeleteWebsiteData(callbackID), 0);
};
if ((websiteDataTypes & WebsiteDataTypeDiskCache) && !sessionID.isEphemeral()) {
clearDiskCache(modifiedSince, WTFMove(completionHandler));
return;
}
completionHandler();
}
开发者ID:valbok,项目名称:WebKitForWayland,代码行数:25,代码来源:NetworkProcess.cpp
示例7: parentProcessConnection
void NetworkProcess::logDiagnosticMessageWithValue(uint64_t webPageID, const String& message, const String& description, const String& value, ShouldSample shouldSample)
{
if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample))
return;
parentProcessConnection()->send(Messages::NetworkProcessProxy::LogSampledDiagnosticMessageWithValue(webPageID, message, description, value), 0);
}
开发者ID:valbok,项目名称:WebKitForWayland,代码行数:7,代码来源:NetworkProcess.cpp
示例8: parentProcessConnection
void WebProcess::processSuspensionCleanupTimerFired()
{
if (!markAllLayersVolatileIfPossible())
return;
m_processSuspensionCleanupTimer.stop();
if (m_shouldAcknowledgeWhenReadyToSuspend == ShouldAcknowledgeWhenReadyToSuspend::Yes)
parentProcessConnection()->send(Messages::WebProcessProxy::ProcessReadyToSuspend(), 0);
}
开发者ID:GaoHuijian,项目名称:webkit,代码行数:8,代码来源:WebProcess.cpp
示例9: parentProcessConnection
void PluginProcess::getSitesWithData(uint64_t callbackID)
{
Vector<String> sites;
if (NetscapePluginModule* module = netscapePluginModule())
sites = module->sitesWithData();
parentProcessConnection()->send(Messages::PluginProcessProxy::DidGetSitesWithData(sites, callbackID), 0);
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:8,代码来源:PluginProcess.cpp
示例10: OS
void PluginProcess::createWebProcessConnection()
{
bool didHaveAnyWebProcessConnections = !m_webProcessConnections.isEmpty();
#if OS(DARWIN)
// Create the listening port.
mach_port_t listeningPort;
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
// Create a listening connection.
RefPtr<WebProcessConnection> connection = WebProcessConnection::create(IPC::Connection::Identifier(listeningPort));
if (m_audioHardwareListener) {
if (m_audioHardwareListener->hardwareActivity() == WebCore::AudioHardwareActivityType::IsActive)
connection->audioHardwareDidBecomeActive();
else if (m_audioHardwareListener->hardwareActivity() == WebCore::AudioHardwareActivityType::IsInactive)
connection->audioHardwareDidBecomeInactive();
}
m_webProcessConnections.append(connection.release());
IPC::Attachment clientPort(listeningPort, MACH_MSG_TYPE_MAKE_SEND);
parentProcessConnection()->send(Messages::PluginProcessProxy::DidCreateWebProcessConnection(clientPort, m_supportsAsynchronousPluginInitialization), 0);
#elif USE(UNIX_DOMAIN_SOCKETS)
IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
RefPtr<WebProcessConnection> connection = WebProcessConnection::create(socketPair.server);
m_webProcessConnections.append(connection.release());
IPC::Attachment clientSocket(socketPair.client);
parentProcessConnection()->send(Messages::PluginProcessProxy::DidCreateWebProcessConnection(clientSocket, m_supportsAsynchronousPluginInitialization), 0);
#else
notImplemented();
#endif
if (NetscapePluginModule* module = netscapePluginModule()) {
if (!didHaveAnyWebProcessConnections) {
// Increment the load count. This is matched by a call to decrementLoadCount in removeWebProcessConnection.
// We do this so that the plug-in module's NP_Shutdown won't be called until right before exiting.
module->incrementLoadCount();
}
}
disableTermination();
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:45,代码来源:PluginProcess.cpp
示例11: LOG
void WebProcess::addPlugInAutoStartOrigin(const String& pageOrigin, unsigned plugInOriginHash)
{
if (isPlugInAutoStartOrigin(plugInOriginHash)) {
LOG(Plugins, "Hash %x already exists as auto-start origin (request for %s)", plugInOriginHash, pageOrigin.utf8().data());
return;
}
parentProcessConnection()->send(Messages::WebContext::AddPlugInAutoStartOriginHash(pageOrigin, plugInOriginHash), 0);
}
开发者ID:awong-chromium,项目名称:webkit,代码行数:9,代码来源:WebProcess.cpp
示例12: setAllLayerTreeStatesFrozen
void WebProcess::cancelPrepareToSuspend()
{
setAllLayerTreeStatesFrozen(false);
// If we've already finished cleaning up and sent ProcessReadyToSuspend, we
// shouldn't send DidCancelProcessSuspension; the UI process strictly expects one or the other.
if (!m_processSuspensionCleanupTimer.isActive())
return;
m_processSuspensionCleanupTimer.stop();
parentProcessConnection()->send(Messages::WebProcessProxy::DidCancelProcessSuspension(), 0);
}
开发者ID:GaoHuijian,项目名称:webkit,代码行数:12,代码来源:WebProcess.cpp
示例13: ASSERT
bool WebProcess::shouldTerminate()
{
ASSERT(m_pageMap.isEmpty());
ASSERT(usesNetworkProcess() || !downloadManager().isDownloading());
// FIXME: the ShouldTerminate message should also send termination parameters, such as any session cookies that need to be preserved.
bool shouldTerminate = false;
if (parentProcessConnection()->sendSync(Messages::WebProcessProxy::ShouldTerminate(), Messages::WebProcessProxy::ShouldTerminate::Reply(shouldTerminate), 0)
&& !shouldTerminate)
return false;
return true;
}
开发者ID:GaoHuijian,项目名称:webkit,代码行数:13,代码来源:WebProcess.cpp
示例14: parentProcessConnection
void WebProcess::plugInDidReceiveUserInteraction(unsigned plugInOriginHash)
{
if (!plugInOriginHash)
return;
HashMap<unsigned, double>::iterator it = m_plugInAutoStartOrigins.find(plugInOriginHash);
if (it == m_plugInAutoStartOrigins.end())
return;
if (it->value - currentTime() > plugInAutoStartExpirationTimeUpdateThreshold)
return;
parentProcessConnection()->send(Messages::WebContext::PlugInDidReceiveUserInteraction(plugInOriginHash), 0);
}
开发者ID:awong-chromium,项目名称:webkit,代码行数:13,代码来源:WebProcess.cpp
示例15: UNUSED_PARAM
void WebProcess::deleteWebsiteData(SessionID sessionID, uint64_t websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
{
UNUSED_PARAM(modifiedSince);
if (websiteDataTypes & WebsiteDataTypeMemoryCache) {
PageCache::singleton().pruneToSizeNow(0, PruningReason::None);
MemoryCache::singleton().evictResources(sessionID);
CrossOriginPreflightResultCache::singleton().empty();
}
parentProcessConnection()->send(Messages::WebProcessProxy::DidDeleteWebsiteData(callbackID), 0);
}
开发者ID:GaoHuijian,项目名称:webkit,代码行数:13,代码来源:WebProcess.cpp
示例16: parentProcessConnection
void PluginProcess::clearSiteData(const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID)
{
if (NetscapePluginModule* module = netscapePluginModule()) {
if (sites.isEmpty()) {
// Clear everything.
module->clearSiteData(String(), flags, maxAgeInSeconds);
} else {
for (size_t i = 0; i < sites.size(); ++i)
module->clearSiteData(sites[i], flags, maxAgeInSeconds);
}
}
parentProcessConnection()->send(Messages::PluginProcessProxy::DidClearSiteData(callbackID), 0);
}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:14,代码来源:PluginProcess.cpp
示例17: shared
void NetworkProcess::getNetworkProcessStatistics(uint64_t callbackID)
{
NetworkResourceLoadScheduler& scheduler = NetworkProcess::shared().networkResourceLoadScheduler();
StatisticsData data;
data.statisticsNumbers.set("HostsPendingCount", scheduler.hostsPendingCount());
data.statisticsNumbers.set("HostsActiveCount", scheduler.hostsActiveCount());
data.statisticsNumbers.set("LoadsPendingCount", scheduler.loadsPendingCount());
data.statisticsNumbers.set("LoadsActiveCount", scheduler.loadsActiveCount());
data.statisticsNumbers.set("DownloadsActiveCount", shared().downloadManager().activeDownloadCount());
data.statisticsNumbers.set("OutstandingAuthenticationChallengesCount", shared().authenticationManager().outstandingAuthenticationChallengeCount());
parentProcessConnection()->send(Messages::WebContext::DidGetStatistics(data, callbackID), 0);
}
开发者ID:PTaylour,项目名称:webkit,代码行数:15,代码来源:NetworkProcess.cpp
示例18: lock
void WebProcess::getWebCoreStatistics(uint64_t callbackID)
{
StatisticsData data;
// Gather JavaScript statistics.
{
JSLockHolder lock(JSDOMWindow::commonVM());
data.statisticsNumbers.set(ASCIILiteral("JavaScriptObjectsCount"), JSDOMWindow::commonVM().heap.objectCount());
data.statisticsNumbers.set(ASCIILiteral("JavaScriptGlobalObjectsCount"), JSDOMWindow::commonVM().heap.globalObjectCount());
data.statisticsNumbers.set(ASCIILiteral("JavaScriptProtectedObjectsCount"), JSDOMWindow::commonVM().heap.protectedObjectCount());
data.statisticsNumbers.set(ASCIILiteral("JavaScriptProtectedGlobalObjectsCount"), JSDOMWindow::commonVM().heap.protectedGlobalObjectCount());
std::unique_ptr<TypeCountSet> protectedObjectTypeCounts(JSDOMWindow::commonVM().heap.protectedObjectTypeCounts());
fromCountedSetToHashMap(protectedObjectTypeCounts.get(), data.javaScriptProtectedObjectTypeCounts);
std::unique_ptr<TypeCountSet> objectTypeCounts(JSDOMWindow::commonVM().heap.objectTypeCounts());
fromCountedSetToHashMap(objectTypeCounts.get(), data.javaScriptObjectTypeCounts);
uint64_t javaScriptHeapSize = JSDOMWindow::commonVM().heap.size();
data.statisticsNumbers.set(ASCIILiteral("JavaScriptHeapSize"), javaScriptHeapSize);
data.statisticsNumbers.set(ASCIILiteral("JavaScriptFreeSize"), JSDOMWindow::commonVM().heap.capacity() - javaScriptHeapSize);
}
WTF::FastMallocStatistics fastMallocStatistics = WTF::fastMallocStatistics();
data.statisticsNumbers.set(ASCIILiteral("FastMallocReservedVMBytes"), fastMallocStatistics.reservedVMBytes);
data.statisticsNumbers.set(ASCIILiteral("FastMallocCommittedVMBytes"), fastMallocStatistics.committedVMBytes);
data.statisticsNumbers.set(ASCIILiteral("FastMallocFreeListBytes"), fastMallocStatistics.freeListBytes);
// Gather icon statistics.
data.statisticsNumbers.set(ASCIILiteral("IconPageURLMappingCount"), iconDatabase().pageURLMappingCount());
data.statisticsNumbers.set(ASCIILiteral("IconRetainedPageURLCount"), iconDatabase().retainedPageURLCount());
data.statisticsNumbers.set(ASCIILiteral("IconRecordCount"), iconDatabase().iconRecordCount());
data.statisticsNumbers.set(ASCIILiteral("IconsWithDataCount"), iconDatabase().iconRecordCountWithData());
// Gather font statistics.
auto& fontCache = FontCache::singleton();
data.statisticsNumbers.set(ASCIILiteral("CachedFontDataCount"), fontCache.fontCount());
data.statisticsNumbers.set(ASCIILiteral("CachedFontDataInactiveCount"), fontCache.inactiveFontCount());
// Gather glyph page statistics.
data.statisticsNumbers.set(ASCIILiteral("GlyphPageCount"), GlyphPage::count());
// Get WebCore memory cache statistics
getWebCoreMemoryCacheStatistics(data.webCoreCacheStatistics);
parentProcessConnection()->send(Messages::WebProcessPool::DidGetStatistics(data, callbackID), 0);
}
开发者ID:GaoHuijian,项目名称:webkit,代码行数:47,代码来源:WebProcess.cpp
示例19: deleteCookiesForHostnames
void NetworkProcess::deleteWebsiteDataForOrigins(SessionID sessionID, uint64_t websiteDataTypes, const Vector<SecurityOriginData>& origins, const Vector<String>& cookieHostNames, uint64_t callbackID)
{
if (websiteDataTypes & WebsiteDataTypeCookies) {
if (auto* networkStorageSession = SessionTracker::storageSession(sessionID))
deleteCookiesForHostnames(*networkStorageSession, cookieHostNames);
}
auto completionHandler = [this, callbackID] {
parentProcessConnection()->send(Messages::NetworkProcessProxy::DidDeleteWebsiteDataForOrigins(callbackID), 0);
};
if ((websiteDataTypes & WebsiteDataTypeDiskCache) && !sessionID.isEphemeral()) {
clearDiskCacheEntries(origins, WTFMove(completionHandler));
return;
}
completionHandler();
}
开发者ID:valbok,项目名称:WebKitForWayland,代码行数:18,代码来源:NetworkProcess.cpp
注:本文中的parentProcessConnection函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论