From 830897a1774fb50d04b656d7bf70be321e133cf9 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 11 May 2017 14:36:10 -0400 Subject: Move map and codec loading into manager This Cl consolidates the code to load maps and codecs into the CPDF_ModuleMgr class instead of putting it directly into fpdfview. Change-Id: Ia08f212f43a33e51ab1c7832051ee4f28eecb50d Reviewed-on: https://pdfium-review.googlesource.com/5335 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- core/fxge/ge/cfx_gemodule.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'core/fxge/ge') diff --git a/core/fxge/ge/cfx_gemodule.cpp b/core/fxge/ge/cfx_gemodule.cpp index 125758b6ad..2cd1e31144 100644 --- a/core/fxge/ge/cfx_gemodule.cpp +++ b/core/fxge/ge/cfx_gemodule.cpp @@ -6,6 +6,7 @@ #include "core/fxge/cfx_gemodule.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxge/cfx_fontcache.h" #include "core/fxge/cfx_fontmgr.h" #include "core/fxge/ge/cfx_folderfontinfo.h" @@ -19,9 +20,8 @@ CFX_GEModule* g_pGEModule = nullptr; } // namespace CFX_GEModule::CFX_GEModule() - : m_FTLibrary(nullptr), - m_pFontMgr(new CFX_FontMgr), - m_pCodecModule(nullptr), + : m_pFontMgr(pdfium::MakeUnique()), + m_pCodecModule(pdfium::MakeUnique()), m_pPlatformData(nullptr), m_pUserFontPaths(nullptr) {} @@ -43,10 +43,8 @@ void CFX_GEModule::Destroy() { g_pGEModule = nullptr; } -void CFX_GEModule::Init(const char** userFontPaths, - CCodec_ModuleMgr* pCodecModule) { +void CFX_GEModule::Init(const char** userFontPaths) { ASSERT(g_pGEModule); - m_pCodecModule = pCodecModule; m_pUserFontPaths = userFontPaths; InitPlatform(); SetTextGamma(2.2f); -- cgit v1.2.3