You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
38 lines
972 B
C++
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 |