• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ipc::Decoder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ipc::Decoder的典型用法代码示例。如果您正苦于以下问题:C++ Decoder类的具体用法?C++ Decoder怎么用?C++ Decoder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Decoder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: decode

bool WebPreferencesStore::decode(IPC::Decoder& decoder, WebPreferencesStore& result)
{
    if (!decoder.decode(result.m_values))
        return false;
    if (!decoder.decode(result.m_overridenDefaults))
        return false;
    return true;
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:8,代码来源:WebPreferencesStore.cpp


示例2: didReceiveMessage

void PluginProcessConnection::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder)
{
    ASSERT(decoder.destinationID());

    PluginProxy* pluginProxy = m_plugins.get(decoder.destinationID());
    if (!pluginProxy)
        return;

    pluginProxy->didReceivePluginProxyMessage(connection, decoder);
}
开发者ID:eocanha,项目名称:webkit,代码行数:10,代码来源:PluginProcessConnection.cpp


示例3: didReceiveMessage

void WebToDatabaseProcessConnection::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder)
{
#if ENABLE(INDEXED_DATABASE)
    if (decoder.messageReceiverName() == Messages::WebIDBConnectionToServer::messageReceiverName()) {
        auto idbConnection = m_webIDBConnectionsByIdentifier.get(decoder.destinationID());
        if (idbConnection)
            idbConnection->didReceiveMessage(connection, decoder);
        return;
    }
#endif
    
    ASSERT_NOT_REACHED();
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:13,代码来源:WebToDatabaseProcessConnection.cpp


示例4: decode

bool GamepadData::decode(IPC::Decoder& decoder, GamepadData& data)
{
    if (!decoder.decode(data.index))
        return false;

    if (!decoder.decode(data.axisValues))
        return false;

    if (!decoder.decode(data.buttonValues))
        return false;

    return true;
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:13,代码来源:GamepadData.cpp


示例5: URL

bool Plugin::Parameters::decode(IPC::Decoder& 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 = URL(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(COCOA)
    if (!decoder.decodeEnum(parameters.layerHostingMode))
        return false;
#endif
    if (parameters.names.size() != parameters.values.size()) {
        decoder.markInvalid();
        return false;
    }

    return true;
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:29,代码来源:Plugin.cpp


示例6: decode

bool WebPlatformTouchPoint::decode(IPC::Decoder& decoder, WebPlatformTouchPoint& result)
{
    if (!decoder.decode(result.m_identifier))
        return false;
    if (!decoder.decode(result.m_location))
        return false;
    if (!decoder.decode(result.m_phase))
        return false;
#if ENABLE(IOS_TOUCH_EVENTS)
    if (!decoder.decode(result.m_force))
        return false;
#endif
    return true;
}
开发者ID:annulen,项目名称:webkit,代码行数:14,代码来源:WebPlatformTouchPointIOS.cpp


示例7: didReceiveMessage

void NetworkConnectionToWebProcess::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder)
{
    if (decoder.messageReceiverName() == Messages::NetworkConnectionToWebProcess::messageReceiverName()) {
        didReceiveNetworkConnectionToWebProcessMessage(connection, decoder);
        return;
    }

    if (decoder.messageReceiverName() == Messages::NetworkResourceLoader::messageReceiverName()) {
        HashMap<ResourceLoadIdentifier, RefPtr<NetworkResourceLoader>>::iterator loaderIterator = m_networkResourceLoaders.find(decoder.destinationID());
        if (loaderIterator != m_networkResourceLoaders.end())
            loaderIterator->value->didReceiveNetworkResourceLoaderMessage(connection, decoder);
        return;
    }
    
    ASSERT_NOT_REACHED();
}
开发者ID:eocanha,项目名称:webkit,代码行数:16,代码来源:NetworkConnectionToWebProcess.cpp


示例8: didReceiveSyncMessage

void NetworkConnectionToWebProcess::didReceiveSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& reply)
{
    if (decoder.messageReceiverName() == Messages::NetworkConnectionToWebProcess::messageReceiverName()) {
        didReceiveSyncNetworkConnectionToWebProcessMessage(connection, decoder, reply);
        return;
    }
    ASSERT_NOT_REACHED();
}
开发者ID:eocanha,项目名称:webkit,代码行数:8,代码来源:NetworkConnectionToWebProcess.cpp


示例9: ASSERT

bool SharedMemory::Handle::decode(IPC::Decoder& decoder, Handle& handle)
{
    ASSERT(!handle.m_port);
    ASSERT(!handle.m_size);

    uint64_t size;
    if (!decoder.decode(size))
        return false;

    IPC::MachPort machPort;
    if (!decoder.decode(machPort))
        return false;
    
    handle.m_size = size;
    handle.m_port = machPort.port();
    return true;
}
开发者ID:eocanha,项目名称:webkit,代码行数:17,代码来源:SharedMemoryCocoa.cpp


示例10: decode

bool URLResponse::decode(IPC::Decoder& decoder, RefPtr<Object>& result)
{
    ResourceResponse response;
    if (!decoder.decode(response))
        return false;

    result = create(response);
    return true;
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:9,代码来源:APIURLResponse.cpp


示例11: decode

bool OptionItem::decode(IPC::Decoder& decoder, OptionItem& result)
{
    if (!decoder.decode(result.text))
        return false;

    if (!decoder.decode(result.isGroup))
        return false;

    if (!decoder.decode(result.isSelected))
        return false;

    if (!decoder.decode(result.disabled))
        return false;

    if (!decoder.decode(result.parentGroupID))
        return false;
    
    return true;
}
开发者ID:annulen,项目名称:webkit,代码行数:19,代码来源:AssistedNodeInformation.cpp


示例12: switch

bool WebPreferencesStore::Value::decode(IPC::Decoder& decoder, Value& result)
{
    Value::Type type;
    if (!decoder.decodeEnum(type))
        return false;
    
    switch (type) {
    case Type::None:
        break;
    case Type::String: {
        String value;
        if (!decoder.decode(value))
            return false;
        result = Value(value);
        break;
    }
    case Type::Bool: {
        bool value;
        if (!decoder.decode(value))
            return false;
        result = Value(value);
        break;
    }
    case Type::UInt32: {
        uint32_t value;
        if (!decoder.decode(value))
            return false;
        result = Value(value);
        break;
    }
    case Type::Double: {
        double value;
        if (!decoder.decode(value))
            return false;
        result = Value(value);
        break;
    }
    default:
        return false;
    }

    return true;
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:43,代码来源:WebPreferencesStore.cpp


示例13: didReceiveSyncMessage

void PluginProcessConnection::didReceiveSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder)
{
    if (decoder.messageReceiverName() == Messages::NPObjectMessageReceiver::messageReceiverName()) {
        m_npRemoteObjectMap->didReceiveSyncMessage(connection, decoder, replyEncoder);
        return;
    }

    uint64_t destinationID = decoder.destinationID();

    if (!destinationID) {
        didReceiveSyncPluginProcessConnectionMessage(connection, decoder, replyEncoder);
        return;
    }

    PluginProxy* pluginProxy = m_plugins.get(destinationID);
    if (!pluginProxy)
        return;

    pluginProxy->didReceiveSyncPluginProxyMessage(connection, decoder, replyEncoder);
}
开发者ID:eocanha,项目名称:webkit,代码行数:20,代码来源:PluginProcessConnection.cpp


示例14:

bool SharedMemory::Handle::decode(IPC::Decoder& decoder, Handle& handle)
{
    ASSERT_ARG(handle, handle.isNull());

    IPC::Attachment attachment;
    if (!decoder.decode(attachment))
        return false;

    handle.adoptAttachment(WTFMove(attachment));
    return true;
}
开发者ID:eocanha,项目名称:webkit,代码行数:11,代码来源:SharedMemoryUnix.cpp


示例15: didReceiveMessage

void WebProcessConnection::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder)
{
    TemporaryChange<IPC::Connection*> currentConnectionChange(currentConnection, &connection);

    if (decoder.messageReceiverName() == Messages::WebProcessConnection::messageReceiverName()) {
        didReceiveWebProcessConnectionMessage(connection, decoder);
        return;
    }

    if (!decoder.destinationID()) {
        ASSERT_NOT_REACHED();
        return;
    }

    PluginControllerProxy* pluginControllerProxy = m_pluginControllers.get(decoder.destinationID());
    if (!pluginControllerProxy)
        return;

    PluginController::PluginDestructionProtector protector(pluginControllerProxy->asPluginController());
    pluginControllerProxy->didReceivePluginControllerProxyMessage(connection, decoder);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:21,代码来源:WebProcessConnection.cpp


示例16: didReceiveSyncMessage

void WebPage::didReceiveSyncMessage(IPC::Connection* connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder)
{
    if (decoder.messageName() == Messages::WebPage::CreatePlugin::name()) {
        IPC::handleMessage<Messages::WebPage::CreatePlugin>(decoder, *replyEncoder, this, &WebPage::createPlugin);
        return;
    }
    if (decoder.messageName() == Messages::WebPage::RunJavaScriptAlert::name()) {
        IPC::handleMessage<Messages::WebPage::RunJavaScriptAlert>(decoder, *replyEncoder, this, &WebPage::runJavaScriptAlert);
        return;
    }
    if (decoder.messageName() == Messages::WebPage::GetPlugins::name()) {
        IPC::handleMessage<Messages::WebPage::GetPlugins>(decoder, *replyEncoder, this, &WebPage::getPlugins);
        return;
    }
    if (decoder.messageName() == Messages::WebPage::GetPluginProcessConnection::name()) {
        IPC::handleMessageDelayed<Messages::WebPage::GetPluginProcessConnection>(connection, decoder, replyEncoder, this, &WebPage::getPluginProcessConnection);
        return;
    }
    if (decoder.messageName() == Messages::WebPage::TestMultipleAttributes::name()) {
        IPC::handleMessageDelayed<Messages::WebPage::TestMultipleAttributes>(connection, decoder, replyEncoder, this, &WebPage::testMultipleAttributes);
        return;
    }
#if PLATFORM(MAC)
    if (decoder.messageName() == Messages::WebPage::InterpretKeyEvent::name()) {
        IPC::handleMessage<Messages::WebPage::InterpretKeyEvent>(decoder, *replyEncoder, this, &WebPage::interpretKeyEvent);
        return;
    }
#endif
    UNUSED_PARAM(connection);
    UNUSED_PARAM(decoder);
    UNUSED_PARAM(replyEncoder);
    ASSERT_NOT_REACHED();
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:33,代码来源:MessageReceiver-expected.cpp


示例17: didReceiveSyncMessage

void WebProcessConnection::didReceiveSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder)
{
    TemporaryChange<IPC::Connection*> currentConnectionChange(currentConnection, &connection);

    uint64_t destinationID = decoder.destinationID();

    if (!destinationID) {
        didReceiveSyncWebProcessConnectionMessage(connection, decoder, replyEncoder);
        return;
    }

    if (decoder.messageReceiverName() == Messages::NPObjectMessageReceiver::messageReceiverName()) {
        m_npRemoteObjectMap->didReceiveSyncMessage(connection, decoder, replyEncoder);
        return;
    }

    PluginControllerProxy* pluginControllerProxy = m_pluginControllers.get(decoder.destinationID());
    if (!pluginControllerProxy)
        return;

    PluginController::PluginDestructionProtector protector(pluginControllerProxy->asPluginController());
    pluginControllerProxy->didReceiveSyncPluginControllerProxyMessage(connection, decoder, replyEncoder);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:23,代码来源:WebProcessConnection.cpp


示例18: decode

bool WebPopupItem::decode(IPC::Decoder& decoder, WebPopupItem& item)
{
    Type type;
    if (!decoder.decodeEnum(type))
        return false;

    String text;
    if (!decoder.decode(text))
        return false;
    
    TextDirection textDirection;
    if (!decoder.decodeEnum(textDirection))
        return false;

    bool hasTextDirectionOverride;
    if (!decoder.decode(hasTextDirectionOverride))
        return false;

    String toolTip;
    if (!decoder.decode(toolTip))
        return false;

    String accessibilityText;
    if (!decoder.decode(accessibilityText))
        return false;

    bool isEnabled;
    if (!decoder.decode(isEnabled))
        return false;

    bool isLabel;
    if (!decoder.decode(isLabel))
        return false;

    bool isSelected;
    if (!decoder.decode(isSelected))
        return false;

    item = WebPopupItem(type, text, textDirection, hasTextDirectionOverride, toolTip, accessibilityText, isEnabled, isLabel, isSelected);
    return true;
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:41,代码来源:WebPopupItem.cpp


示例19: decode

bool FontInfo::decode(IPC::Decoder& decoder, FontInfo& fontInfo)
{    
#if PLATFORM(COCOA)
    bool hasFontAttributeDictionary;
    if (!decoder.decode(hasFontAttributeDictionary))
        return false;

    if (!hasFontAttributeDictionary)
        return true;

    if (!IPC::decode(decoder, fontInfo.fontAttributeDictionary))
        return false;
#else
    UNUSED_PARAM(decoder);
    UNUSED_PARAM(fontInfo);
#endif
    
    return true;
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:19,代码来源:FontInfo.cpp


示例20: decode

bool WebTouchEvent::decode(IPC::Decoder& decoder, WebTouchEvent& result)
{
    if (!WebEvent::decode(decoder, result))
        return false;

    if (!decoder.decode(result.m_touchPoints))
        return false;
    if (!decoder.decode(result.m_position))
        return false;
    if (!decoder.decode(result.m_canPreventNativeGestures))
        return false;
    if (!decoder.decode(result.m_isPotentialTap))
        return false;
    if (!decoder.decode(result.m_isGesture))
        return false;
    if (!decoder.decode(result.m_gestureScale))
        return false;
    if (!decoder.decode(result.m_gestureRotation))
        return false;

    return true;
}
开发者ID:annulen,项目名称:webkit,代码行数:22,代码来源:WebTouchEventIOS.cpp



注:本文中的ipc::Decoder类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ipc::MessageDecoder类代码示例发布时间:2022-05-31
下一篇:
C++ ipc::DataReference类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap