From 20855384b8149a631c3c1d229551523c12eb767b Mon Sep 17 00:00:00 2001 From: dsinclair Date: Mon, 31 Oct 2016 07:29:34 -0700 Subject: Remove FWL globals. This CL removes the FWL_GetApp, FWL_SetApp and FWL_GetWidgetAdapter methods. In the process it changes the various Initialize methods to return void. Review-Url: https://codereview.chromium.org/2436103002 --- fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp | 2 +- fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp index 4c390ae917..f5e36d4a67 100644 --- a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp +++ b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp @@ -24,7 +24,7 @@ FWL_Error CXFA_FWLAdapterTimerMgr::Start(IFWL_Timer* pTimer, if (!s_TimerArray) s_TimerArray = new std::vector; - s_TimerArray->push_back(new CFWL_TimerInfo(id_event, pTimer)); + s_TimerArray->push_back(new CFWL_TimerInfo(this, id_event, pTimer)); *pTimerInfo = s_TimerArray->back(); return FWL_Error::Succeeded; } diff --git a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h index 3fc56ee0e7..092148f4f2 100644 --- a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h +++ b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h @@ -33,9 +33,8 @@ class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr { }; struct CFWL_TimerInfo : public IFWL_TimerInfo { - CFWL_TimerInfo() : pTimer(nullptr) {} - CFWL_TimerInfo(int32_t event, IFWL_Timer* timer) - : idEvent(event), pTimer(timer) {} + CFWL_TimerInfo(IFWL_AdapterTimerMgr* mgr, int32_t event, IFWL_Timer* timer) + : IFWL_TimerInfo(mgr), idEvent(event), pTimer(timer) {} int32_t idEvent; IFWL_Timer* pTimer; -- cgit v1.2.3