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/JS_Object.h" | 7 #include "fpdfsdk/javascript/JS_Object.h" |
8 | 8 |
9 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. | 9 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. |
10 #include "fpdfsdk/include/javascript/IJavaScript.h" | 10 #include "fpdfsdk/include/javascript/IJavaScript.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 if (pApp) | 90 if (pApp) |
91 pApp->JS_appAlert(swMsg, NULL, 0, 3); | 91 pApp->JS_appAlert(swMsg, NULL, 0, 3); |
92 } | 92 } |
93 } | 93 } |
94 | 94 |
95 CJS_Timer::CJS_Timer(CJS_EmbedObj* pObj, | 95 CJS_Timer::CJS_Timer(CJS_EmbedObj* pObj, |
96 CPDFDoc_Environment* pApp, | 96 CPDFDoc_Environment* pApp, |
97 CJS_Runtime* pRuntime, | 97 CJS_Runtime* pRuntime, |
98 int nType, | 98 int nType, |
99 const CFX_WideString& script, | 99 const CFX_WideString& script, |
100 FX_DWORD dwElapse, | 100 uint32_t dwElapse, |
101 FX_DWORD dwTimeOut) | 101 uint32_t dwTimeOut) |
102 : m_nTimerID(0), | 102 : m_nTimerID(0), |
103 m_pEmbedObj(pObj), | 103 m_pEmbedObj(pObj), |
104 m_bProcessing(false), | 104 m_bProcessing(false), |
105 m_bValid(true), | 105 m_bValid(true), |
106 m_nType(nType), | 106 m_nType(nType), |
107 m_dwTimeOut(dwTimeOut), | 107 m_dwTimeOut(dwTimeOut), |
108 m_swJScript(script), | 108 m_swJScript(script), |
109 m_pRuntime(pRuntime), | 109 m_pRuntime(pRuntime), |
110 m_pApp(pApp) { | 110 m_pApp(pApp) { |
111 IFX_SystemHandler* pHandler = m_pApp->GetSysHandler(); | 111 IFX_SystemHandler* pHandler = m_pApp->GetSysHandler(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // static | 149 // static |
150 CJS_Timer::TimerMap* CJS_Timer::GetGlobalTimerMap() { | 150 CJS_Timer::TimerMap* CJS_Timer::GetGlobalTimerMap() { |
151 // Leak the timer array at shutdown. | 151 // Leak the timer array at shutdown. |
152 static auto* s_TimerMap = new TimerMap; | 152 static auto* s_TimerMap = new TimerMap; |
153 return s_TimerMap; | 153 return s_TimerMap; |
154 } | 154 } |
155 | 155 |
156 void CJS_Timer::OnDestroyed() { | 156 void CJS_Timer::OnDestroyed() { |
157 m_bValid = false; | 157 m_bValid = false; |
158 } | 158 } |
OLD | NEW |