本文整理汇总了C++中coreipc::MessageDecoder::decode方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageDecoder::decode方法的具体用法?C++ MessageDecoder::decode怎么用?C++ MessageDecoder::decode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类coreipc::MessageDecoder
的用法示例。
在下文中一共展示了MessageDecoder::decode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initializeWebProcess
void WebProcess::initializeWebProcess(const WebProcessCreationParameters& parameters, CoreIPC::MessageDecoder& decoder)
{
ASSERT(m_pageMap.isEmpty());
platformInitializeWebProcess(parameters, decoder);
memoryPressureHandler().install();
RefPtr<APIObject> injectedBundleInitializationUserData;
InjectedBundleUserMessageDecoder messageDecoder(injectedBundleInitializationUserData);
if (!decoder.decode(messageDecoder))
return;
if (!parameters.injectedBundlePath.isEmpty()) {
m_injectedBundle = InjectedBundle::create(parameters.injectedBundlePath);
m_injectedBundle->setSandboxExtension(SandboxExtension::create(parameters.injectedBundlePathExtensionHandle));
if (!m_injectedBundle->load(injectedBundleInitializationUserData.get())) {
// Don't keep around the InjectedBundle reference if the load fails.
m_injectedBundle.clear();
}
}
#if ENABLE(SQL_DATABASE)
// Make sure the WebDatabaseManager is initialized so that the Database directory is set.
WebDatabaseManager::initialize(parameters.databaseDirectory);
#endif
#if ENABLE(ICONDATABASE)
m_iconDatabaseProxy.setEnabled(parameters.iconDatabaseEnabled);
#endif
StorageTracker::initializeTracker(parameters.localStorageDirectory, &WebKeyValueStorageManager::shared());
m_localStorageDirectory = parameters.localStorageDirectory;
if (!parameters.applicationCacheDirectory.isEmpty())
cacheStorage().setCacheDirectory(parameters.applicationCacheDirectory);
setShouldTrackVisitedLinks(parameters.shouldTrackVisitedLinks);
setCacheModel(static_cast<uint32_t>(parameters.cacheModel));
if (!parameters.languages.isEmpty())
overrideUserPreferredLanguages(parameters.languages);
m_textCheckerState = parameters.textCheckerState;
m_fullKeyboardAccessEnabled = parameters.fullKeyboardAccessEnabled;
for (size_t i = 0; i < parameters.urlSchemesRegistererdAsEmptyDocument.size(); ++i)
registerURLSchemeAsEmptyDocument(parameters.urlSchemesRegistererdAsEmptyDocument[i]);
for (size_t i = 0; i < parameters.urlSchemesRegisteredAsSecure.size(); ++i)
registerURLSchemeAsSecure(parameters.urlSchemesRegisteredAsSecure[i]);
for (size_t i = 0; i < parameters.urlSchemesForWhichDomainRelaxationIsForbidden.size(); ++i)
setDomainRelaxationForbiddenForURLScheme(parameters.urlSchemesForWhichDomainRelaxationIsForbidden[i]);
for (size_t i = 0; i < parameters.urlSchemesRegisteredAsLocal.size(); ++i)
registerURLSchemeAsLocal(parameters.urlSchemesRegisteredAsLocal[i]);
for (size_t i = 0; i < parameters.urlSchemesRegisteredAsNoAccess.size(); ++i)
registerURLSchemeAsNoAccess(parameters.urlSchemesRegisteredAsNoAccess[i]);
for (size_t i = 0; i < parameters.urlSchemesRegisteredAsDisplayIsolated.size(); ++i)
registerURLSchemeAsDisplayIsolated(parameters.urlSchemesRegisteredAsDisplayIsolated[i]);
for (size_t i = 0; i < parameters.urlSchemesRegisteredAsCORSEnabled.size(); ++i)
registerURLSchemeAsCORSEnabled(parameters.urlSchemesRegisteredAsCORSEnabled[i]);
setDefaultRequestTimeoutInterval(parameters.defaultRequestTimeoutInterval);
if (parameters.shouldAlwaysUseComplexTextCodePath)
setAlwaysUsesComplexTextCodePath(true);
if (parameters.shouldUseFontSmoothing)
setShouldUseFontSmoothing(true);
#if (PLATFORM(MAC) || USE(CFNETWORK)) && !PLATFORM(WIN)
WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase(parameters.uiProcessBundleIdentifier);
#endif
#if ENABLE(NETWORK_PROCESS)
m_usesNetworkProcess = parameters.usesNetworkProcess;
ensureNetworkProcessConnection();
#endif
setTerminationTimeout(parameters.terminationTimeout);
for (size_t i = 0; i < parameters.plugInAutoStartOrigins.size(); ++i)
didAddPlugInAutoStartOrigin(parameters.plugInAutoStartOrigins[i]);
#if ENABLE(CUSTOM_PROTOCOLS)
initializeCustomProtocolManager(parameters);
#endif
}