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

Side by Side Diff: fpdfsdk/include/fpdfxfa/fpdfxfa_util.h

Issue 1664543005: Kill CFX_PtryArray in CXFA_FWLAdapterTimerMgr. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Stale iterator. Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_INCLUDE_FPDFXFA_FPDFXFA_UTIL_H_ 7 #ifndef FPDFSDK_INCLUDE_FPDFXFA_FPDFXFA_UTIL_H_
8 #define FPDFSDK_INCLUDE_FPDFXFA_FPDFXFA_UTIL_H_ 8 #define FPDFSDK_INCLUDE_FPDFXFA_FPDFXFA_UTIL_H_
9 9
10 #include <vector>
11
10 #include "xfa/include/fwl/adapter/fwl_adaptertimermgr.h" 12 #include "xfa/include/fwl/adapter/fwl_adaptertimermgr.h"
11 13
12 #define JS_STR_VIEWERTYPE_STANDARD L"Exchange" 14 #define JS_STR_VIEWERTYPE_STANDARD L"Exchange"
13 #define JS_STR_LANGUANGE L"ENU" 15 #define JS_STR_LANGUANGE L"ENU"
14 #define JS_STR_VIEWERVARIATION L"Full" 16 #define JS_STR_VIEWERVARIATION L"Full"
15 #define JS_STR_VIEWERVERSION_XFA L"11" 17 #define JS_STR_VIEWERVERSION_XFA L"11"
16 18
19 class CFWL_TimerInfo;
20
17 class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr { 21 class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr {
18 public: 22 public:
19 CXFA_FWLAdapterTimerMgr(CPDFDoc_Environment* pEnv) : m_pEnv(pEnv) {} 23 CXFA_FWLAdapterTimerMgr(CPDFDoc_Environment* pEnv) : m_pEnv(pEnv) {}
20 virtual FWL_ERR Start(IFWL_Timer* pTimer, 24 virtual FWL_ERR Start(IFWL_Timer* pTimer,
21 FX_DWORD dwElapse, 25 FX_DWORD dwElapse,
22 FWL_HTIMER& hTimer, 26 FWL_HTIMER& hTimer,
23 FX_BOOL bImmediately = TRUE); 27 FX_BOOL bImmediately = TRUE);
24 virtual FWL_ERR Stop(FWL_HTIMER hTimer); 28 virtual FWL_ERR Stop(FWL_HTIMER hTimer);
25 29
26 protected: 30 protected:
27 static void TimerProc(int32_t idEvent); 31 static void TimerProc(int32_t idEvent);
28 32
29 static CFX_PtrArray ms_timerArray; 33 static std::vector<CFWL_TimerInfo*> s_TimerArray;
30 CPDFDoc_Environment* m_pEnv; 34 CPDFDoc_Environment* const m_pEnv;
31 }; 35 };
32 36
33 class CFWL_TimerInfo { 37 class CFWL_TimerInfo {
34 public: 38 public:
35 CFWL_TimerInfo() : pTimer(nullptr) {} 39 CFWL_TimerInfo() : pTimer(nullptr) {}
40 CFWL_TimerInfo(uint32_t event, IFWL_Timer* timer)
41 : uIDEvent(event), pTimer(timer) {}
42
36 uint32_t uIDEvent; 43 uint32_t uIDEvent;
37 IFWL_Timer* pTimer; 44 IFWL_Timer* pTimer;
38 }; 45 };
39 46
40 #endif // FPDFSDK_INCLUDE_FPDFXFA_FPDFXFA_UTIL_H_ 47 #endif // FPDFSDK_INCLUDE_FPDFXFA_FPDFXFA_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698