WebCompiledContentRuleListData.h [plain text]
#pragma once
#if ENABLE(CONTENT_EXTENSIONS)
#include "NetworkCacheData.h"
#include "SharedMemory.h"
#include <wtf/RefPtr.h>
namespace IPC {
class Decoder;
class Encoder;
}
namespace WebKit {
class WebCompiledContentRuleListData {
public:
WebCompiledContentRuleListData() = default;
WebCompiledContentRuleListData(RefPtr<SharedMemory>&& data, NetworkCache::Data fileData, unsigned conditionsApplyOnlyToDomainOffset, unsigned actionsOffset, unsigned actionsSize, unsigned filtersWithoutConditionsBytecodeOffset, unsigned filtersWithoutConditionsBytecodeSize, unsigned filtersWithConditionsBytecodeOffset, unsigned filtersWithConditionsBytecodeSize, unsigned topURLFiltersBytecodeOffset, unsigned topURLFiltersBytecodeSize)
: data(WTFMove(data))
, fileData(fileData)
, conditionsApplyOnlyToDomainOffset(conditionsApplyOnlyToDomainOffset)
, actionsOffset(actionsOffset)
, actionsSize(actionsSize)
, filtersWithoutConditionsBytecodeOffset(filtersWithoutConditionsBytecodeOffset)
, filtersWithoutConditionsBytecodeSize(filtersWithoutConditionsBytecodeSize)
, filtersWithConditionsBytecodeOffset(filtersWithConditionsBytecodeOffset)
, filtersWithConditionsBytecodeSize(filtersWithConditionsBytecodeSize)
, topURLFiltersBytecodeOffset(topURLFiltersBytecodeOffset)
, topURLFiltersBytecodeSize(topURLFiltersBytecodeSize)
{
}
void encode(IPC::Encoder&) const;
static std::optional<WebCompiledContentRuleListData> decode(IPC::Decoder&);
RefPtr<SharedMemory> data;
NetworkCache::Data fileData;
unsigned conditionsApplyOnlyToDomainOffset { 0 };
unsigned actionsOffset { 0 };
unsigned actionsSize { 0 };
unsigned filtersWithoutConditionsBytecodeOffset { 0 };
unsigned filtersWithoutConditionsBytecodeSize { 0 };
unsigned filtersWithConditionsBytecodeOffset { 0 };
unsigned filtersWithConditionsBytecodeSize { 0 };
unsigned topURLFiltersBytecodeOffset { 0 };
unsigned topURLFiltersBytecodeSize { 0 };
};
}
#endif // ENABLE(CONTENT_EXTENSIONS)