Files
UnrealEngineUWP/Engine/Source/Runtime/WebBrowser/Private/WebBrowserModule.cpp
Alex Fennell d10f9953d9 Copying //UE4/Portal-Staging to //UE4/Dev-Main (Source: //UE4/Portal-Staging @ 3138637)
#lockdown Nick.Penwarden, justin.sargent
#rb None

[CL 3138769 by Alex Fennell in Main branch]
2016-09-23 17:31:51 -04:00

50 lines
992 B
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#include "WebBrowserPrivatePCH.h"
#include "WebBrowserSingleton.h"
#include "ModuleManager.h"
#if WITH_CEF3
# include "CEF3Utils.h"
#endif
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;
}