| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef FPDFSDK_FPDFXFA_CXFA_FWLADAPTERTIMERMGR_H_ | 7 #ifndef FPDFSDK_FPDFXFA_CXFA_FWLADAPTERTIMERMGR_H_ |
| 8 #define FPDFSDK_FPDFXFA_CXFA_FWLADAPTERTIMERMGR_H_ | 8 #define FPDFSDK_FPDFXFA_CXFA_FWLADAPTERTIMERMGR_H_ |
| 9 | 9 |
| 10 #include <memory> |
| 10 #include <vector> | 11 #include <vector> |
| 11 | 12 |
| 12 #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" | 13 #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" |
| 14 #include "xfa/fwl/core/cfwl_timerinfo.h" |
| 13 #include "xfa/fwl/core/ifwl_adaptertimermgr.h" | 15 #include "xfa/fwl/core/ifwl_adaptertimermgr.h" |
| 14 #include "xfa/fwl/core/ifwl_timerinfo.h" | |
| 15 | |
| 16 struct CFWL_TimerInfo; | |
| 17 | 16 |
| 18 class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr { | 17 class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr { |
| 19 public: | 18 public: |
| 20 explicit CXFA_FWLAdapterTimerMgr(CPDFSDK_FormFillEnvironment* pFormFillEnv) | 19 explicit CXFA_FWLAdapterTimerMgr(CPDFSDK_FormFillEnvironment* pFormFillEnv) |
| 21 : m_pFormFillEnv(pFormFillEnv) {} | 20 : m_pFormFillEnv(pFormFillEnv) {} |
| 22 | 21 |
| 23 void Start(IFWL_Timer* pTimer, | 22 void Start(CFWL_Timer* pTimer, |
| 24 uint32_t dwElapse, | 23 uint32_t dwElapse, |
| 25 bool bImmediately, | 24 bool bImmediately, |
| 26 IFWL_TimerInfo** pTimerInfo) override; | 25 CFWL_TimerInfo** pTimerInfo) override; |
| 27 void Stop(IFWL_TimerInfo* pTimerInfo) override; | 26 void Stop(CFWL_TimerInfo* pTimerInfo) override; |
| 28 | 27 |
| 29 protected: | 28 protected: |
| 30 static void TimerProc(int32_t idEvent); | 29 static void TimerProc(int32_t idEvent); |
| 31 | 30 |
| 32 static std::vector<CFWL_TimerInfo*>* s_TimerArray; | 31 static std::vector<CFWL_TimerInfo*>* s_TimerArray; |
| 33 CPDFSDK_FormFillEnvironment* const m_pFormFillEnv; | 32 CPDFSDK_FormFillEnvironment* const m_pFormFillEnv; |
| 34 }; | 33 }; |
| 35 | 34 |
| 36 struct CFWL_TimerInfo : public IFWL_TimerInfo { | |
| 37 CFWL_TimerInfo(IFWL_AdapterTimerMgr* mgr, int32_t event, IFWL_Timer* timer) | |
| 38 : IFWL_TimerInfo(mgr), idEvent(event), pTimer(timer) {} | |
| 39 | |
| 40 int32_t idEvent; | |
| 41 IFWL_Timer* pTimer; | |
| 42 }; | |
| 43 | |
| 44 #endif // FPDFSDK_FPDFXFA_CXFA_FWLADAPTERTIMERMGR_H_ | 35 #endif // FPDFSDK_FPDFXFA_CXFA_FWLADAPTERTIMERMGR_H_ |
| OLD | NEW |