// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "CEF/CEFBrowserByteResource.h" #if WITH_CEF3 void FCEFBrowserByteResource::Cancel() { } void FCEFBrowserByteResource::GetResponseHeaders(CefRefPtr Response, int64& ResponseLength, CefString& RedirectUrl) { Response->SetMimeType("text/html"); Response->SetStatus(200); Response->SetStatusText("OK"); ResponseLength = Size; } bool FCEFBrowserByteResource::ProcessRequest(CefRefPtr Request, CefRefPtr Callback) { Callback->Continue(); return true; } bool FCEFBrowserByteResource::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