本文整理汇总了C++中ipc::ArgumentEncoder类的典型用法代码示例。如果您正苦于以下问题:C++ ArgumentEncoder类的具体用法?C++ ArgumentEncoder怎么用?C++ ArgumentEncoder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ArgumentEncoder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: encode
void AssistedNodeInformation::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << elementRect;
encoder << selectionRect;
encoder << minimumScaleFactor;
encoder << maximumScaleFactor;
encoder << nodeFontSize;
encoder << hasNextNode;
encoder << hasPreviousNode;
encoder << isAutocorrect;
encoder << isRTL;
encoder.encodeEnum(autocapitalizeType);
encoder.encodeEnum(elementType);
encoder << formAction;
encoder << selectOptions;
encoder << selectedIndex;
encoder << isMultiSelect;
encoder << isReadOnly;
encoder << allowsUserScaling;
encoder << allowsUserScalingIgnoringForceAlwaysScaling;
encoder << insideFixedPosition;
encoder << value;
encoder << valueAsNumber;
encoder << title;
encoder.encodeEnum(autofillFieldName);
}
示例2:
void Coder<WebCore::CertificateInfo>::encode(Encoder& encoder, const WebCore::CertificateInfo& certificateInfo)
{
// FIXME: Cocoa CertificateInfo is a CF object tree. Generalize CF type coding so we don't need to use ArgumentCoder here.
IPC::ArgumentEncoder argumentEncoder;
argumentEncoder << certificateInfo;
encoder << static_cast<uint64_t>(argumentEncoder.bufferSize());
encoder.encodeFixedLengthData(argumentEncoder.buffer(), argumentEncoder.bufferSize());
}
示例3: encode
void WebContextMenuItemData::encode(IPC::ArgumentEncoder& encoder) const
{
// WebContextMenuItemDatas with a selection handler are meant to exist solely in the UIProcess and should never be sent over IPC.
ASSERT(!m_selectionHandler);
encoder.encodeEnum(m_type);
encoder.encodeEnum(m_action);
encoder << m_title;
encoder << m_checked;
encoder << m_enabled;
encoder << m_submenu;
}
示例4: encode
void WebPageCreationParameters::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << viewSize;
encoder << viewState;
encoder << store;
encoder.encodeEnum(drawingAreaType);
encoder << pageGroupData;
encoder << drawsBackground;
encoder << isEditable;
encoder << drawsTransparentBackground;
encoder << underlayColor;
encoder << useFixedLayout;
encoder << fixedLayoutSize;
encoder.encodeEnum(paginationMode);
encoder << paginationBehavesLikeColumns;
encoder << pageLength;
encoder << gapBetweenPages;
encoder << userAgent;
encoder << itemStates;
encoder << sessionID;
encoder << highestUsedBackForwardItemID;
encoder << userContentControllerID;
encoder << visitedLinkTableID;
encoder << websiteDataStoreID;
encoder << canRunBeforeUnloadConfirmPanel;
encoder << canRunModal;
encoder << deviceScaleFactor;
encoder << topContentInset;
encoder << mediaVolume;
encoder << muted;
encoder << mayStartMediaWhenInWindow;
encoder << minimumLayoutSize;
encoder << autoSizingShouldExpandToViewHeight;
encoder.encodeEnum(scrollPinningBehavior);
encoder << backgroundExtendsBeyondPage;
encoder.encodeEnum(layerHostingMode);
encoder << mimeTypesWithCustomContentProviders;
#if ENABLE(REMOTE_INSPECTOR)
encoder << allowsRemoteInspection;
#endif
#if PLATFORM(MAC)
encoder << colorSpace;
#endif
#if PLATFORM(IOS)
encoder << screenSize;
encoder << availableScreenSize;
encoder << textAutosizingWidth;
#endif
encoder << appleMailPaginationQuirkEnabled;
}
示例5: encode
void NetworkResourceLoadParameters::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << identifier;
encoder << webPageID;
encoder << webFrameID;
encoder << sessionID;
encoder << request;
encoder << static_cast<bool>(request.httpBody());
if (request.httpBody()) {
EncoderAdapter httpBodyEncoderAdapter;
request.httpBody()->encode(httpBodyEncoderAdapter);
encoder << httpBodyEncoderAdapter.dataReference();
const Vector<FormDataElement>& elements = request.httpBody()->elements();
size_t fileCount = 0;
for (size_t i = 0, count = elements.size(); i < count; ++i) {
if (elements[i].m_type == FormDataElement::encodedFile)
++fileCount;
}
SandboxExtension::HandleArray requestBodySandboxExtensions;
requestBodySandboxExtensions.allocate(fileCount);
size_t extensionIndex = 0;
for (size_t i = 0, count = elements.size(); i < count; ++i) {
const FormDataElement& element = elements[i];
if (element.m_type == FormDataElement::encodedFile) {
const String& path = element.m_shouldGenerateFile ? element.m_generatedFilename : element.m_filename;
SandboxExtension::createHandle(path, SandboxExtension::ReadOnly, requestBodySandboxExtensions[extensionIndex++]);
}
}
encoder << requestBodySandboxExtensions;
}
if (request.url().isLocalFile()) {
SandboxExtension::Handle requestSandboxExtension;
SandboxExtension::createHandle(request.url().fileSystemPath(), SandboxExtension::ReadOnly, requestSandboxExtension);
encoder << requestSandboxExtension;
}
encoder.encodeEnum(priority);
encoder.encodeEnum(contentSniffingPolicy);
encoder.encodeEnum(allowStoredCredentials);
encoder.encodeEnum(clientCredentialPolicy);
encoder << shouldClearReferrerOnHTTPSToHTTPRedirect;
encoder << isMainResource;
}
示例6: postMessageToInjectedBundle
void WebContext::postMessageToInjectedBundle(const String& messageName, API::Object* messageBody)
{
if (m_processes.isEmpty()) {
if (m_processModel == ProcessModelSharedSecondaryProcess)
m_messagesToInjectedBundlePostedToEmptyContext.append(std::make_pair(messageName, messageBody));
return;
}
for (auto& process : m_processes) {
// FIXME: Return early if the message body contains any references to WKPageRefs/WKFrameRefs etc. since they're local to a process.
IPC::ArgumentEncoder messageData;
messageData.encode(messageName);
messageData.encode(WebContextUserMessageEncoder(messageBody, *process.get()));
process->send(Messages::WebProcess::PostInjectedBundleMessage(IPC::DataReference(messageData.buffer(), messageData.bufferSize())), 0);
}
}
示例7: encode
void UserData::encode(IPC::ArgumentEncoder& encoder, const API::Object* object) const
{
if (!object) {
encoder.encodeEnum(API::Object::Type::Null);
return;
}
encode(encoder, *object);
}
示例8: encode
void NetworkProcessCreationParameters::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << privateBrowsingEnabled;
encoder.encodeEnum(cacheModel);
encoder << diskCacheSizeOverride;
encoder << canHandleHTTPSServerTrustEvaluation;
encoder << diskCacheDirectory;
encoder << diskCacheDirectoryExtensionHandle;
#if ENABLE(NETWORK_CACHE)
encoder << shouldEnableNetworkCache;
encoder << shouldEnableNetworkCacheEfficacyLogging;
#endif
#if ENABLE(SECCOMP_FILTERS)
encoder << cookieStorageDirectory;
#endif
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
encoder << uiProcessCookieStorageIdentifier;
#endif
#if PLATFORM(IOS)
encoder << cookieStorageDirectoryExtensionHandle;
encoder << containerCachesDirectoryExtensionHandle;
encoder << parentBundleDirectoryExtensionHandle;
#endif
encoder << shouldUseTestingNetworkSession;
encoder << urlSchemesRegisteredForCustomProtocols;
#if PLATFORM(COCOA)
encoder << parentProcessName;
encoder << uiProcessBundleIdentifier;
encoder << nsURLCacheMemoryCapacity;
encoder << nsURLCacheDiskCapacity;
encoder << httpProxy;
encoder << httpsProxy;
#if TARGET_OS_IPHONE || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
IPC::encode(encoder, networkATSContext.get());
#endif
#endif
#if USE(SOUP)
encoder << cookiePersistentStoragePath;
encoder << cookiePersistentStorageType;
encoder.encodeEnum(cookieAcceptPolicy);
encoder << ignoreTLSErrors;
encoder << languages;
#endif
}
示例9:
void HTTPBody::Element::encode(IPC::ArgumentEncoder& encoder) const
{
encoder.encodeEnum(type);
encoder << data;
encoder << filePath;
encoder << fileStart;
encoder << fileLength;
encoder << expectedFileModificationTime;
encoder << blobURLString;
}
示例10: encode
void QuickLookDocumentData::encode(IPC::ArgumentEncoder& encoder) const
{
uint64_t size = 0;
for (const auto& data : m_data)
size += CFDataGetLength(data.get());
encoder << size;
for (const auto& data : m_data)
encoder.encodeFixedLengthData(CFDataGetBytePtr(data.get()), CFDataGetLength(data.get()), 1);
}
示例11: encode
void PlatformPopupMenuData::encode(IPC::ArgumentEncoder& encoder) const
{
#if PLATFORM(COCOA)
encoder << fontInfo;
encoder << shouldPopOver;
encoder << hideArrows;
encoder.encodeEnum(menuSize);
#else
UNUSED_PARAM(encoder);
#endif
}
示例12: PLATFORM
void Plugin::Parameters::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << url.string();
encoder << names;
encoder << values;
encoder << mimeType;
encoder << isFullFramePlugin;
encoder << shouldUseManualLoader;
#if PLATFORM(COCOA)
encoder.encodeEnum(layerHostingMode);
#endif
}
示例13: encode
void WebPageCreationParameters::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << viewSize;
encoder << viewState;
encoder << store;
encoder.encodeEnum(drawingAreaType);
encoder << pageGroupData;
encoder << drawsBackground;
encoder << drawsTransparentBackground;
encoder << underlayColor;
encoder << areMemoryCacheClientCallsEnabled;
encoder << useFixedLayout;
encoder << fixedLayoutSize;
encoder.encodeEnum(paginationMode);
encoder << paginationBehavesLikeColumns;
encoder << pageLength;
encoder << gapBetweenPages;
encoder << userAgent;
encoder << sessionState;
encoder << highestUsedBackForwardItemID;
encoder << visitedLinkTableID;
encoder << canRunBeforeUnloadConfirmPanel;
encoder << canRunModal;
encoder << deviceScaleFactor;
encoder << mediaVolume;
encoder << mayStartMediaWhenInWindow;
encoder << minimumLayoutSize;
encoder << autoSizingShouldExpandToViewHeight;
encoder.encodeEnum(scrollPinningBehavior);
encoder << backgroundExtendsBeyondPage;
encoder.encodeEnum(layerHostingMode);
#if PLATFORM(COCOA)
encoder << colorSpace;
#endif
#if PLATFORM(IOS)
encoder << viewportScreenSize;
#endif
}
示例14:
void WebsiteData::Entry::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << SecurityOriginData::fromSecurityOrigin(*origin);
encoder.encodeEnum(type);
}
示例15: encode
void WebProcessCreationParameters::encode(IPC::ArgumentEncoder& encoder) const
{
encoder << injectedBundlePath;
encoder << injectedBundlePathExtensionHandle;
encoder << initializationUserData;
encoder << applicationCacheDirectory;
encoder << applicationCacheFlatFileSubdirectoryName;
encoder << applicationCacheDirectoryExtensionHandle;
encoder << webSQLDatabaseDirectory;
encoder << webSQLDatabaseDirectoryExtensionHandle;
encoder << mediaCacheDirectory;
encoder << mediaCacheDirectoryExtensionHandle;
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
encoder << uiProcessCookieStorageIdentifier;
#endif
#if PLATFORM(IOS)
encoder << cookieStorageDirectoryExtensionHandle;
encoder << containerCachesDirectoryExtensionHandle;
encoder << containerTemporaryDirectoryExtensionHandle;
#endif
encoder << mediaKeyStorageDirectory;
encoder << mediaKeyStorageDirectoryExtensionHandle;
encoder << shouldUseTestingNetworkSession;
encoder << urlSchemesRegisteredAsEmptyDocument;
encoder << urlSchemesRegisteredAsSecure;
encoder << urlSchemesRegisteredAsBypassingContentSecurityPolicy;
encoder << urlSchemesForWhichDomainRelaxationIsForbidden;
encoder << urlSchemesRegisteredAsLocal;
encoder << urlSchemesRegisteredAsNoAccess;
encoder << urlSchemesRegisteredAsDisplayIsolated;
encoder << urlSchemesRegisteredAsCORSEnabled;
encoder << urlSchemesRegisteredAsAlwaysRevalidated;
#if ENABLE(CACHE_PARTITIONING)
encoder << urlSchemesRegisteredAsCachePartitioned;
#endif
encoder.encodeEnum(cacheModel);
encoder << shouldAlwaysUseComplexTextCodePath;
encoder << shouldEnableMemoryPressureReliefLogging;
encoder << shouldSuppressMemoryPressureHandler;
encoder << shouldUseFontSmoothing;
encoder << resourceLoadStatisticsEnabled;
encoder << fontWhitelist;
encoder << iconDatabaseEnabled;
encoder << terminationTimeout;
encoder << languages;
encoder << textCheckerState;
encoder << fullKeyboardAccessEnabled;
encoder << defaultRequestTimeoutInterval;
#if PLATFORM(COCOA) || USE(CFNETWORK)
encoder << uiProcessBundleIdentifier;
#endif
#if PLATFORM(COCOA)
encoder << presenterApplicationPid;
encoder << accessibilityEnhancedUserInterfaceEnabled;
encoder << acceleratedCompositingPort;
encoder << uiProcessBundleResourcePath;
encoder << uiProcessBundleResourcePathExtensionHandle;
encoder << shouldEnableJIT;
encoder << shouldEnableFTLJIT;
encoder << !!bundleParameterData;
if (bundleParameterData)
encoder << bundleParameterData->dataReference();
#endif
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
encoder << notificationPermissions;
#endif
encoder << plugInAutoStartOriginHashes;
encoder << plugInAutoStartOrigins;
encoder << memoryCacheDisabled;
#if ENABLE(SERVICE_CONTROLS)
encoder << hasImageServices;
encoder << hasSelectionServices;
encoder << hasRichContentServices;
#endif
#if ENABLE(NETSCAPE_PLUGIN_API)
encoder << pluginLoadClientPolicies;
#endif
#if TARGET_OS_IPHONE || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
IPC::encode(encoder, networkATSContext.get());
#endif
}