SerializationMethods.h [plain text]
#ifndef SerializationMethods_h
#define SerializationMethods_h
#if ENABLE(WEB_REPLAY)
#include <replay/EncodedValue.h>
#include <replay/NondeterministicInput.h>
#include <wtf/Vector.h>
namespace WebCore {
class Document;
class Frame;
class Page;
class PlatformKeyboardEvent;
class PlatformMouseEvent;
class PlatformWheelEvent;
class PluginData;
class SecurityOrigin;
class URL;
#if USE(APPKIT)
struct KeypressCommand;
#endif
uint32_t frameIndexFromDocument(const Document*);
uint32_t frameIndexFromFrame(const Frame*);
Document* documentFromFrameIndex(Page*, uint32_t frameIndex);
Frame* frameFromFrameIndex(Page*, uint32_t frameIndex);
}
namespace JSC {
#if USE(APPKIT)
template<> struct EncodingTraits<WebCore::KeypressCommand> {
typedef WebCore::KeypressCommand DecodedType;
static EncodedValue encodeValue(const WebCore::KeypressCommand& value);
static bool decodeValue(EncodedValue&, WebCore::KeypressCommand& value);
};
#endif // USE(APPKIT)
template<> struct EncodingTraits<NondeterministicInputBase> {
typedef NondeterministicInputBase DecodedType;
static EncodedValue encodeValue(const NondeterministicInputBase& value);
static bool decodeValue(EncodedValue&, std::unique_ptr<NondeterministicInputBase>& value);
};
template<> struct EncodingTraits<WebCore::PlatformKeyboardEvent> {
typedef WebCore::PlatformKeyboardEvent DecodedType;
static EncodedValue encodeValue(const WebCore::PlatformKeyboardEvent& value);
static bool decodeValue(EncodedValue&, std::unique_ptr<WebCore::PlatformKeyboardEvent>& value);
};
template<> struct EncodingTraits<WebCore::PlatformMouseEvent> {
typedef WebCore::PlatformMouseEvent DecodedType;
static EncodedValue encodeValue(const WebCore::PlatformMouseEvent& value);
static bool decodeValue(EncodedValue&, std::unique_ptr<WebCore::PlatformMouseEvent>& value);
};
template<> struct EncodingTraits<WebCore::PlatformWheelEvent> {
typedef WebCore::PlatformWheelEvent DecodedType;
static EncodedValue encodeValue(const WebCore::PlatformWheelEvent& value);
static bool decodeValue(EncodedValue&, std::unique_ptr<WebCore::PlatformWheelEvent>& value);
};
template<> struct EncodingTraits<WebCore::PluginData> {
typedef RefPtr<WebCore::PluginData> DecodedType;
static EncodedValue encodeValue(RefPtr<WebCore::PluginData> value);
static bool decodeValue(EncodedValue&, RefPtr<WebCore::PluginData>& value);
};
template<> struct EncodingTraits<WebCore::URL> {
typedef WebCore::URL DecodedType;
static EncodedValue encodeValue(const WebCore::URL& value);
static bool decodeValue(EncodedValue&, WebCore::URL& value);
};
template<> struct EncodingTraits<WebCore::SecurityOrigin> {
typedef RefPtr<WebCore::SecurityOrigin> DecodedType;
static EncodedValue encodeValue(RefPtr<WebCore::SecurityOrigin> value);
static bool decodeValue(EncodedValue&, RefPtr<WebCore::SecurityOrigin>& value);
};
}
#endif // ENABLE(WEB_REPLAY)
#endif // SerializationMethods_h