Files
UnrealEngineUWP/Engine/Source/Runtime/WebBrowser/Private/WebBrowserModule.cpp
Matthew Griffin bb70b349ce Merging CL 2804086 from //UE4/Release-4.11 to Dev-Main (//UE4/Dev-Main) to isolate copyright update
#lockdown Nick.Penwarden

[CL 2819020 by Matthew Griffin in Main branch]
2016-01-07 08:17:16 -05:00

48 lines
970 B
C++

// Copyright 1998-2016 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() override;
};
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;
}