// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "WebBrowserPrivatePCH.h" #include "WebBrowserByteResource.h" #if WITH_CEF3 void FWebBrowserByteResource::Cancel() { } void FWebBrowserByteResource::GetResponseHeaders(CefRefPtr Response, int64& ResponseLength, CefString& RedirectUrl) { Response->SetMimeType("text/html"); Response->SetStatus(200); Response->SetStatusText("OK"); ResponseLength = Size; } bool FWebBrowserByteResource::ProcessRequest(CefRefPtr Request, CefRefPtr Callback) { Callback->Continue(); return true; } bool FWebBrowserByteResource::ReadResponse(void* DataOut, int BytesToRead, int& BytesRead, CefRefPtr Callback) { int32 BytesLeft = Size - Position; BytesRead = BytesLeft >= BytesToRead ? BytesToRead : BytesLeft; if (BytesRead > 0) { FMemory::Memcpy(DataOut, Buffer + Position, BytesRead); Position += BytesRead; return true; } return false; } #endif