本文整理汇总了C++中coreipc::ArgumentDecoder类的典型用法代码示例。如果您正苦于以下问题:C++ ArgumentDecoder类的具体用法?C++ ArgumentDecoder怎么用?C++ ArgumentDecoder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ArgumentDecoder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: decode
bool NPIdentifierData::decode(CoreIPC::ArgumentDecoder& decoder, NPIdentifierData& result)
{
if (!decoder.decode(result.m_isString))
return false;
if (result.m_isString)
return decoder.decode(result.m_string);
return decoder.decode(result.m_number);
}
示例2:
bool ShareableResource::Handle::decode(CoreIPC::ArgumentDecoder& decoder, Handle& handle)
{
if (!decoder.decode(handle.m_handle))
return false;
if (!decoder.decode(handle.m_offset))
return false;
if (!decoder.decode(handle.m_size))
return false;
return true;
}
示例3: decode
bool Size::decode(CoreIPC::ArgumentDecoder& decoder, RefPtr<API::Object>& result)
{
WKSize size;
if (!decoder.decode(size.width))
return false;
if (!decoder.decode(size.height))
return false;
result = Size::create(size);
return true;
}
示例4: decode
bool WebGestureEvent::decode(CoreIPC::ArgumentDecoder& decoder, WebGestureEvent& t)
{
if (!WebEvent::decode(decoder, t))
return false;
if (!decoder.decode(t.m_position))
return false;
if (!decoder.decode(t.m_globalPosition))
return false;
if (!decoder.decode(t.m_area))
return false;
if (!decoder.decode(t.m_delta))
return false;
return true;
}
示例5: KURL
bool Plugin::Parameters::decode(CoreIPC::ArgumentDecoder& decoder, Parameters& parameters)
{
String urlString;
if (!decoder.decode(urlString))
return false;
// FIXME: We can't assume that the url passed in here is valid.
parameters.url = KURL(ParsedURLString, urlString);
if (!decoder.decode(parameters.names))
return false;
if (!decoder.decode(parameters.values))
return false;
if (!decoder.decode(parameters.mimeType))
return false;
if (!decoder.decode(parameters.isFullFramePlugin))
return false;
if (!decoder.decode(parameters.shouldUseManualLoader))
return false;
#if PLATFORM(MAC)
if (!decoder.decodeEnum(parameters.layerHostingMode))
return false;
#endif
if (parameters.names.size() != parameters.values.size()) {
decoder.markInvalid();
return false;
}
return true;
}
示例6: didReceiveSyncMessage
void WebPageProxy::didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder& arguments, CoreIPC::ArgumentEncoder& reply)
{
switch (messageID.get<WebPageProxyMessage::Kind>()) {
case WebPageProxyMessage::CreateNewPage: {
WebPageProxy* newPage = createNewPage();
if (newPage) {
// FIXME: Pass the real size.
reply.encode(CoreIPC::In(newPage->pageID(), IntSize(100, 100),
newPage->pageNamespace()->context()->preferences()->store(),
*(newPage->m_drawingArea.get())));
} else {
// FIXME: We should encode a drawing area type here instead.
reply.encode(CoreIPC::In(static_cast<uint64_t>(0), IntSize(), WebPreferencesStore(), 0));
}
break;
}
case WebPageProxyMessage::RunJavaScriptAlert: {
uint64_t frameID;
String alertText;
if (!arguments.decode(CoreIPC::Out(frameID, alertText)))
return;
runJavaScriptAlert(webFrame(frameID), alertText);
break;
}
default:
ASSERT_NOT_REACHED();
break;
}
}
示例7: USE
bool WebCoordinatedSurface::Handle::decode(CoreIPC::ArgumentDecoder& decoder, Handle& handle)
{
if (!decoder.decode(handle.m_size))
return false;
if (!decoder.decode(handle.m_flags))
return false;
#if USE(GRAPHICS_SURFACE)
if (!decoder.decode(handle.m_graphicsSurfaceToken))
return false;
if (handle.m_graphicsSurfaceToken.isValid())
return true;
#endif
if (!decoder.decode(handle.m_bitmapHandle))
return false;
return true;
}
示例8: decode
bool PlatformPopupMenuData::decode(CoreIPC::ArgumentDecoder& decoder, PlatformPopupMenuData& data)
{
#if PLATFORM(MAC)
if (!decoder.decode(data.fontInfo))
return false;
if (!decoder.decode(data.shouldPopOver))
return false;
#elif PLATFORM(QT)
if (!decoder.decode(data.multipleSelections))
return false;
#else
UNUSED_PARAM(decoder);
UNUSED_PARAM(data);
#endif
return true;
}
示例9: decode
bool SecItemRequestData::decode(CoreIPC::ArgumentDecoder& decoder, SecItemRequestData& secItemRequestData)
{
if (!decoder.decodeEnum(secItemRequestData.m_type))
return false;
if (!CoreIPC::decode(decoder, secItemRequestData.m_queryDictionary))
return false;
bool expectAttributes;
if (!decoder.decode(expectAttributes))
return false;
if (expectAttributes && !CoreIPC::decode(decoder, secItemRequestData.m_attributesToMatch))
return false;
return true;
}
示例10: decode
bool WebTouchEvent::decode(CoreIPC::ArgumentDecoder& decoder, WebTouchEvent& result)
{
if (!WebEvent::decode(decoder, result))
return false;
if (!decoder.decode(result.m_touchPoints))
return false;
return true;
}
示例11: decode
bool PrintInfo::decode(CoreIPC::ArgumentDecoder& decoder, PrintInfo& info)
{
if (!decoder.decode(info.pageSetupScaleFactor))
return false;
if (!decoder.decode(info.availablePaperWidth))
return false;
if (!decoder.decode(info.availablePaperHeight))
return false;
#if PLATFORM(GTK)
if (!CoreIPC::decode(decoder, info.printSettings))
return false;
if (!CoreIPC::decode(decoder, info.pageSetup))
return false;
if (!decoder.decodeEnum(info.printMode))
return false;
#endif
return true;
}
示例12:
bool SharedMemory::Handle::decode(CoreIPC::ArgumentDecoder& decoder, Handle& handle)
{
ASSERT_ARG(handle, !handle.m_size);
ASSERT_ARG(handle, handle.isNull());
CoreIPC::Attachment attachment;
if (!decoder.decode(attachment))
return false;
handle.adoptFromAttachment(attachment.releaseFileDescriptor(), attachment.size());
return true;
}
示例13: decode
bool WebMouseEvent::decode(CoreIPC::ArgumentDecoder& decoder, WebMouseEvent& result)
{
if (!WebEvent::decode(decoder, result))
return false;
if (!decoder.decode(result.m_button))
return false;
if (!decoder.decode(result.m_position))
return false;
if (!decoder.decode(result.m_globalPosition))
return false;
if (!decoder.decode(result.m_deltaX))
return false;
if (!decoder.decode(result.m_deltaY))
return false;
if (!decoder.decode(result.m_deltaZ))
return false;
if (!decoder.decode(result.m_clickCount))
return false;
return true;
}
示例14: decode
bool WebContextMenuItemData::decode(CoreIPC::ArgumentDecoder& decoder, WebContextMenuItemData& item)
{
WebCore::ContextMenuItemType type;
if (!decoder.decodeEnum(type))
return false;
WebCore::ContextMenuAction action;
if (!decoder.decodeEnum(action))
return false;
String title;
if (!decoder.decode(title))
return false;
bool checked;
if (!decoder.decode(checked))
return false;
bool enabled;
if (!decoder.decode(enabled))
return false;
Vector<WebContextMenuItemData> submenu;
if (!decoder.decode(submenu))
return false;
switch (type) {
case WebCore::ActionType:
case WebCore::SeparatorType:
case WebCore::CheckableActionType:
item = WebContextMenuItemData(type, action, title, enabled, checked);
break;
case WebCore::SubmenuType:
item = WebContextMenuItemData(action, title, enabled, submenu);
break;
default:
ASSERT_NOT_REACHED();
return false;
}
return true;
}
示例15: decode
bool WebWheelEvent::decode(CoreIPC::ArgumentDecoder& decoder, WebWheelEvent& t)
{
if (!WebEvent::decode(decoder, t))
return false;
if (!decoder.decode(t.m_position))
return false;
if (!decoder.decode(t.m_globalPosition))
return false;
if (!decoder.decode(t.m_delta))
return false;
if (!decoder.decode(t.m_wheelTicks))
return false;
if (!decoder.decode(t.m_granularity))
return false;
if (!decoder.decode(t.m_directionInvertedFromDevice))
return false;
#if PLATFORM(MAC)
if (!decoder.decode(t.m_phase))
return false;
if (!decoder.decode(t.m_momentumPhase))
return false;
if (!decoder.decode(t.m_hasPreciseScrollingDeltas))
return false;
if (!decoder.decode(t.m_scrollCount))
return false;
if (!decoder.decode(t.m_unacceleratedScrollingDelta))
return false;
#endif
return true;
}