| 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 <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "fpdfsdk/fpdfxfa/cpdfxfa_document.h" | 12 #include "fpdfsdk/fpdfxfa/cpdfxfa_document.h" |
| 13 #include "xfa/fwl/core/ifwl_adaptertimermgr.h" | 13 #include "xfa/fwl/core/ifwl_adaptertimermgr.h" |
| 14 | 14 |
| 15 #define JS_STR_VIEWERTYPE_STANDARD L"Exchange" | 15 #define JS_STR_VIEWERTYPE_STANDARD L"Exchange" |
| 16 #define JS_STR_LANGUANGE L"ENU" | 16 #define JS_STR_LANGUANGE L"ENU" |
| 17 #define JS_STR_VIEWERVARIATION L"Full" | 17 #define JS_STR_VIEWERVARIATION L"Full" |
| 18 #define JS_STR_VIEWERVERSION_XFA L"11" | 18 #define JS_STR_VIEWERVERSION_XFA L"11" |
| 19 | 19 |
| 20 struct CFWL_TimerInfo; | 20 struct CFWL_TimerInfo; |
| 21 | 21 |
| 22 class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr { | 22 class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr { |
| 23 public: | 23 public: |
| 24 CXFA_FWLAdapterTimerMgr(CPDFSDK_FormFillEnvironment* pEnv) : m_pEnv(pEnv) {} | 24 CXFA_FWLAdapterTimerMgr(CPDFSDK_FormFillEnvironment* pFormFillEnv) |
| 25 : m_pFormFillEnv(pFormFillEnv) {} |
| 25 | 26 |
| 26 FWL_Error Start(IFWL_Timer* pTimer, | 27 FWL_Error Start(IFWL_Timer* pTimer, |
| 27 uint32_t dwElapse, | 28 uint32_t dwElapse, |
| 28 bool bImmediately, | 29 bool bImmediately, |
| 29 IFWL_TimerInfo** pTimerInfo) override; | 30 IFWL_TimerInfo** pTimerInfo) override; |
| 30 FWL_Error Stop(IFWL_TimerInfo* pTimerInfo) override; | 31 FWL_Error Stop(IFWL_TimerInfo* pTimerInfo) override; |
| 31 | 32 |
| 32 protected: | 33 protected: |
| 33 static void TimerProc(int32_t idEvent); | 34 static void TimerProc(int32_t idEvent); |
| 34 | 35 |
| 35 static std::vector<CFWL_TimerInfo*>* s_TimerArray; | 36 static std::vector<CFWL_TimerInfo*>* s_TimerArray; |
| 36 CPDFSDK_FormFillEnvironment* const m_pEnv; | 37 CPDFSDK_FormFillEnvironment* const m_pFormFillEnv; |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 struct CFWL_TimerInfo : public IFWL_TimerInfo { | 40 struct CFWL_TimerInfo : public IFWL_TimerInfo { |
| 40 CFWL_TimerInfo() : pTimer(nullptr) {} | 41 CFWL_TimerInfo() : pTimer(nullptr) {} |
| 41 CFWL_TimerInfo(int32_t event, IFWL_Timer* timer) | 42 CFWL_TimerInfo(int32_t event, IFWL_Timer* timer) |
| 42 : idEvent(event), pTimer(timer) {} | 43 : idEvent(event), pTimer(timer) {} |
| 43 | 44 |
| 44 int32_t idEvent; | 45 int32_t idEvent; |
| 45 IFWL_Timer* pTimer; | 46 IFWL_Timer* pTimer; |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 #endif // FPDFSDK_FPDFXFA_CXFA_FWLADAPTERTIMERMGR_H_ | 49 #endif // FPDFSDK_FPDFXFA_CXFA_FWLADAPTERTIMERMGR_H_ |
| OLD | NEW |