You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Web Browser project mostly exposes interfaces, hiding all of the CEF3 implementation and technically allowing us to slot in another web system if necessary. Normal process will be to request a browser window interface from the web browser singleton. There is also an implementation of ISlateViewport so that it can be displayed via an SViewport. The UnrealCEFSubProcess executable is needed for CEF3 to run additional processes for rendering etc. I don't expect this to change very often so it should hopefully just be built once and distributed, since we can't currently specify a program dependency for other modules. Added a CEF3Utils project to share .dll loading code between web browser and the separate sub process executable. [CL 2317298 by Matthew Griffin in Main branch]
47 lines
960 B
C++
47 lines
960 B
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "WebBrowserPrivatePCH.h"
|
|
#include "WebBrowserSingleton.h"
|
|
#include "ModuleManager.h"
|
|
#include "CEF3Utils.h"
|
|
|
|
DEFINE_LOG_CATEGORY(LogWebBrowser);
|
|
|
|
static FWebBrowserSingleton* WebBrowserSingleton = nullptr;
|
|
|
|
class FWebBrowserModule : public IWebBrowserModule
|
|
{
|
|
private:
|
|
// IModuleInterface Interface
|
|
virtual void StartupModule() override;
|
|
virtual void ShutdownModule() override;
|
|
|
|
public:
|
|
virtual IWebBrowserSingleton* GetSingleton();
|
|
};
|
|
|
|
IMPLEMENT_MODULE( FWebBrowserModule, WebBrowser );
|
|
|
|
void FWebBrowserModule::StartupModule()
|
|
{
|
|
#if WITH_CEF3
|
|
CEF3Utils::LoadCEF3Modules();
|
|
#endif
|
|
|
|
WebBrowserSingleton = new FWebBrowserSingleton();
|
|
}
|
|
|
|
void FWebBrowserModule::ShutdownModule()
|
|
{
|
|
delete WebBrowserSingleton;
|
|
WebBrowserSingleton = NULL;
|
|
|
|
#if WITH_CEF3
|
|
CEF3Utils::UnloadCEF3Modules();
|
|
#endif
|
|
}
|
|
|
|
IWebBrowserSingleton* FWebBrowserModule::GetSingleton()
|
|
{
|
|
return WebBrowserSingleton;
|
|
} |