Files
UnrealEngineUWP/Engine/Source/Runtime/WebBrowser/Private/WebBrowserByteResource.cpp
Justin Sargent 273cde1704 Merging using UE4-To-UE4-LauncherDev
#platformnotify Josh.Adams

[CL 2581810 by Justin Sargent in Main branch]
2015-06-09 16:41:53 -04:00

38 lines
972 B
C++

// 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<CefResponse> Response, int64& ResponseLength, CefString& RedirectUrl)
{
Response->SetMimeType("text/html");
Response->SetStatus(200);
Response->SetStatusText("OK");
ResponseLength = Size;
}
bool FWebBrowserByteResource::ProcessRequest(CefRefPtr<CefRequest> Request, CefRefPtr<CefCallback> Callback)
{
Callback->Continue();
return true;
}
bool FWebBrowserByteResource::ReadResponse(void* DataOut, int BytesToRead, int& BytesRead, CefRefPtr<CefCallback> 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