Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: xfa/fwl/core/fwl_timerimp.cpp

Issue 2037573003: Remove FWL_HTIMER in favor of IWFL_TimerInfo (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp ('k') | xfa/fwl/core/ifwl_timer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/fwl_timerimp.cpp
diff --git a/xfa/fwl/core/fwl_timerimp.cpp b/xfa/fwl/core/fwl_timerimp.cpp
index ced5adeb9df8e33aa3ea7d593f3c5cf4f3459498..22b28c8c678574240d88d1768631797ac2fbf642 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);
}
« no previous file with comments | « xfa/fwl/basewidget/fwl_tooltipctrlimp.cpp ('k') | xfa/fwl/core/ifwl_timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698