diff options
author | tsepez <tsepez@chromium.org> | 2016-06-06 13:23:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-06 13:23:55 -0700 |
commit | 6f4f2335cfd22d26db154fbd51ab553fb9902918 (patch) | |
tree | 175379ace9283314d32cf270fcdeba0c1c55cfbe /xfa/fwl/core/fwl_timerimp.cpp | |
parent | 25dc95a3cb9099550fa4d9d4f1c74b0f996fbc41 (diff) | |
download | pdfium-6f4f2335cfd22d26db154fbd51ab553fb9902918.tar.xz |
Remove FWL_HTIMER in favor of IWFL_TimerInfo
Review-Url: https://codereview.chromium.org/2037573003
Diffstat (limited to 'xfa/fwl/core/fwl_timerimp.cpp')
-rw-r--r-- | xfa/fwl/core/fwl_timerimp.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/xfa/fwl/core/fwl_timerimp.cpp b/xfa/fwl/core/fwl_timerimp.cpp index ced5adeb9d..22b28c8c67 100644 --- a/xfa/fwl/core/fwl_timerimp.cpp +++ b/xfa/fwl/core/fwl_timerimp.cpp @@ -10,21 +10,21 @@ #include "xfa/fwl/core/include/ifwl_adaptertimermgr.h" #include "xfa/fxfa/include/xfa_ffapp.h" -FWL_HTIMER FWL_StartTimer(IFWL_Timer* pTimer, - uint32_t dwElapse, - FX_BOOL bImmediately) { +IFWL_TimerInfo* IFWL_Timer::StartTimer(uint32_t dwElapse, bool bImmediately) { CXFA_FFApp* pAdapterNative = FWL_GetAdapterNative(); if (!pAdapterNative) - return NULL; + return nullptr; + IFWL_AdapterTimerMgr* pAdapterTimerMgr = pAdapterNative->GetTimerMgr(); if (!pAdapterTimerMgr) - return NULL; - FWL_HTIMER hTimer = NULL; - pAdapterTimerMgr->Start(pTimer, dwElapse, hTimer, bImmediately); - return hTimer; + return nullptr; + + IFWL_TimerInfo* pTimerInfo = nullptr; + pAdapterTimerMgr->Start(this, dwElapse, bImmediately, &pTimerInfo); + return pTimerInfo; } -FWL_Error FWL_StopTimer(FWL_HTIMER hTimer) { +FWL_Error IFWL_TimerInfo::StopTimer() { CXFA_FFApp* pAdapterNative = FWL_GetAdapterNative(); if (!pAdapterNative) return FWL_Error::Indefinite; @@ -32,5 +32,6 @@ FWL_Error FWL_StopTimer(FWL_HTIMER hTimer) { IFWL_AdapterTimerMgr* pAdapterTimerMgr = pAdapterNative->GetTimerMgr(); if (!pAdapterTimerMgr) return FWL_Error::Indefinite; - return pAdapterTimerMgr->Stop(hTimer); + + return pAdapterTimerMgr->Stop(this); } |