Files
UnrealEngineUWP/Engine/Source/Developer/WebBrowser/Private/WebBrowserModule.cpp
Ben Marsh 149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00

47 lines
960 B
C++

// Copyright 1998-2015 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;
}