WebSelectionData.cpp [plain text]
#include "config.h"
#include "WebSelectionData.h"
#include "ArgumentCodersGtk.h"
#include "Decoder.h"
#include "Encoder.h"
#include <wtf/RetainPtr.h>
namespace WebKit {
WebSelectionData::WebSelectionData()
: selectionData(WebCore::SelectionData::create())
{
}
WebSelectionData::WebSelectionData(const WebCore::SelectionData& data)
: selectionData(const_cast<WebCore::SelectionData&>(data))
{
}
WebSelectionData::WebSelectionData(Ref<WebCore::SelectionData>&& data)
: selectionData(WTFMove(data))
{
}
void WebSelectionData::encode(IPC::Encoder& encoder) const
{
encoder << selectionData.get();
}
bool WebSelectionData::decode(IPC::Decoder& decoder, WebSelectionData& selection)
{
return decoder.decode(selection.selectionData.get());
}
}