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_JAVASCRIPT_APP_H_ | 7 #ifndef FPDFSDK_JAVASCRIPT_APP_H_ |
8 #define FPDFSDK_JAVASCRIPT_APP_H_ | 8 #define FPDFSDK_JAVASCRIPT_APP_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <vector> | 11 #include <vector> |
Lei Zhang
2016/08/18 06:16:19
IWYU
dsinclair
2016/08/18 13:30:55
Done.
| |
12 | 12 |
13 #include "fpdfsdk/javascript/JS_Define.h" | 13 #include "fpdfsdk/javascript/JS_Define.h" |
14 | 14 |
15 class CJS_Runtime; | 15 class CJS_Runtime; |
16 class GlobalTimer; | 16 class GlobalTimer; |
17 | 17 |
18 class TimerObj : public CJS_EmbedObj { | 18 class TimerObj : public CJS_EmbedObj { |
19 public: | 19 public: |
20 TimerObj(CJS_Object* pJSObject); | 20 TimerObj(CJS_Object* pJSObject); |
21 ~TimerObj() override; | 21 ~TimerObj() override; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 static CFX_WideString SysPathToPDFPath(const CFX_WideString& sOldPath); | 158 static CFX_WideString SysPathToPDFPath(const CFX_WideString& sOldPath); |
159 | 159 |
160 private: | 160 private: |
161 // CJS_EmbedObj | 161 // CJS_EmbedObj |
162 void RunJsScript(CJS_Runtime* pRuntime, const CFX_WideString& wsScript); | 162 void RunJsScript(CJS_Runtime* pRuntime, const CFX_WideString& wsScript); |
163 | 163 |
164 void ClearTimerCommon(CJS_Runtime* pRuntime, const CJS_Value& param); | 164 void ClearTimerCommon(CJS_Runtime* pRuntime, const CJS_Value& param); |
165 | 165 |
166 bool m_bCalculate; | 166 bool m_bCalculate; |
167 bool m_bRuntimeHighLight; | 167 bool m_bRuntimeHighLight; |
168 std::vector<std::unique_ptr<GlobalTimer>> m_Timers; | 168 std::map<GlobalTimer*, std::unique_ptr<GlobalTimer>> m_Timers; |
169 }; | 169 }; |
170 | 170 |
171 class CJS_App : public CJS_Object { | 171 class CJS_App : public CJS_Object { |
172 public: | 172 public: |
173 explicit CJS_App(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} | 173 explicit CJS_App(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} |
174 ~CJS_App() override {} | 174 ~CJS_App() override {} |
175 | 175 |
176 DECLARE_JS_CLASS(); | 176 DECLARE_JS_CLASS(); |
177 | 177 |
178 JS_STATIC_PROP(activeDocs, app); | 178 JS_STATIC_PROP(activeDocs, app); |
(...skipping 26 matching lines...) Expand all Loading... | |
205 JS_STATIC_METHOD(openDoc, app); | 205 JS_STATIC_METHOD(openDoc, app); |
206 JS_STATIC_METHOD(openFDF, app); | 206 JS_STATIC_METHOD(openFDF, app); |
207 JS_STATIC_METHOD(popUpMenuEx, app); | 207 JS_STATIC_METHOD(popUpMenuEx, app); |
208 JS_STATIC_METHOD(popUpMenu, app); | 208 JS_STATIC_METHOD(popUpMenu, app); |
209 JS_STATIC_METHOD(response, app); | 209 JS_STATIC_METHOD(response, app); |
210 JS_STATIC_METHOD(setInterval, app); | 210 JS_STATIC_METHOD(setInterval, app); |
211 JS_STATIC_METHOD(setTimeOut, app); | 211 JS_STATIC_METHOD(setTimeOut, app); |
212 }; | 212 }; |
213 | 213 |
214 #endif // FPDFSDK_JAVASCRIPT_APP_H_ | 214 #endif // FPDFSDK_JAVASCRIPT_APP_H_ |
OLD | NEW |