当前位置: 首页>>代码示例>>C++>>正文


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

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


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


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