summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_environment.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-10-03 15:24:27 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-03 15:24:27 -0700
commit36eb4bdcae719cf33c536ff72ac000482aed8382 (patch)
treeb3c3467fa10eafc3863a619ef511d1bf20af6367 /fpdfsdk/cpdfsdk_environment.cpp
parent76383db4906c9357292846ace77566b34eb47de9 (diff)
downloadpdfium-36eb4bdcae719cf33c536ff72ac000482aed8382.tar.xz
Add ptr_util.h from base until std::make_unique<> available
Review-Url: https://codereview.chromium.org/2386273004
Diffstat (limited to 'fpdfsdk/cpdfsdk_environment.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_environment.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_environment.cpp b/fpdfsdk/cpdfsdk_environment.cpp
index 6ea95ad3f5..df0ba06167 100644
--- a/fpdfsdk/cpdfsdk_environment.cpp
+++ b/fpdfsdk/cpdfsdk_environment.cpp
@@ -13,6 +13,7 @@
#include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
#include "fpdfsdk/fsdk_actionhandler.h"
#include "fpdfsdk/javascript/ijs_runtime.h"
+#include "third_party/base/ptr_util.h"
#ifdef PDF_ENABLE_XFA
#include "fpdfsdk/fpdfxfa/fpdfxfa_app.h"
@@ -201,19 +202,19 @@ IJS_Runtime* CPDFSDK_Environment::GetJSRuntime() {
CPDFSDK_AnnotHandlerMgr* CPDFSDK_Environment::GetAnnotHandlerMgr() {
if (!m_pAnnotHandlerMgr)
- m_pAnnotHandlerMgr = WrapUnique(new CPDFSDK_AnnotHandlerMgr(this));
+ m_pAnnotHandlerMgr = pdfium::MakeUnique<CPDFSDK_AnnotHandlerMgr>(this);
return m_pAnnotHandlerMgr.get();
}
CPDFSDK_ActionHandler* CPDFSDK_Environment::GetActionHander() {
if (!m_pActionHandler)
- m_pActionHandler = WrapUnique(new CPDFSDK_ActionHandler());
+ m_pActionHandler = pdfium::MakeUnique<CPDFSDK_ActionHandler>();
return m_pActionHandler.get();
}
CFFL_InteractiveFormFiller* CPDFSDK_Environment::GetInteractiveFormFiller() {
if (!m_pFormFiller)
- m_pFormFiller = WrapUnique(new CFFL_InteractiveFormFiller(this));
+ m_pFormFiller = pdfium::MakeUnique<CFFL_InteractiveFormFiller>(this);
return m_pFormFiller.get();
}