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 #include "fpdfsdk/javascript/app.h" | 7 #include "fpdfsdk/javascript/app.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 25 matching lines...) Expand all Loading... |
36 static void Trigger(int nTimerID); | 36 static void Trigger(int nTimerID); |
37 static void Cancel(int nTimerID); | 37 static void Cancel(int nTimerID); |
38 | 38 |
39 bool IsOneShot() const { return m_nType == 1; } | 39 bool IsOneShot() const { return m_nType == 1; } |
40 uint32_t GetTimeOut() const { return m_dwTimeOut; } | 40 uint32_t GetTimeOut() const { return m_dwTimeOut; } |
41 int GetTimerID() const { return m_nTimerID; } | 41 int GetTimerID() const { return m_nTimerID; } |
42 CJS_Runtime* GetRuntime() const { return m_pRuntime.Get(); } | 42 CJS_Runtime* GetRuntime() const { return m_pRuntime.Get(); } |
43 CFX_WideString GetJScript() const { return m_swJScript; } | 43 CFX_WideString GetJScript() const { return m_swJScript; } |
44 | 44 |
45 private: | 45 private: |
46 using TimerMap = std::map<FX_UINT, GlobalTimer*>; | 46 using TimerMap = std::map<uint32_t, GlobalTimer*>; |
47 static TimerMap* GetGlobalTimerMap(); | 47 static TimerMap* GetGlobalTimerMap(); |
48 | 48 |
49 uint32_t m_nTimerID; | 49 uint32_t m_nTimerID; |
50 app* const m_pEmbedObj; | 50 app* const m_pEmbedObj; |
51 bool m_bProcessing; | 51 bool m_bProcessing; |
52 | 52 |
53 // data | 53 // data |
54 const int m_nType; // 0:Interval; 1:TimeOut | 54 const int m_nType; // 0:Interval; 1:TimeOut |
55 const uint32_t m_dwTimeOut; | 55 const uint32_t m_dwTimeOut; |
56 const CFX_WideString m_swJScript; | 56 const CFX_WideString m_swJScript; |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { | 812 FX_BOOL app::media(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError) { |
813 return FALSE; | 813 return FALSE; |
814 } | 814 } |
815 | 815 |
816 FX_BOOL app::execDialog(IJS_Context* cc, | 816 FX_BOOL app::execDialog(IJS_Context* cc, |
817 const std::vector<CJS_Value>& params, | 817 const std::vector<CJS_Value>& params, |
818 CJS_Value& vRet, | 818 CJS_Value& vRet, |
819 CFX_WideString& sError) { | 819 CFX_WideString& sError) { |
820 return TRUE; | 820 return TRUE; |
821 } | 821 } |
OLD | NEW |