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_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ | 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ |
8 #define FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ | 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ |
9 | 9 |
10 #include "../../../core/include/fxcrt/fx_string.h" | 10 #include "../../../core/include/fxcrt/fx_string.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 class CJS_RuntimeFactory { | 149 class CJS_RuntimeFactory { |
150 public: | 150 public: |
151 CJS_RuntimeFactory() | 151 CJS_RuntimeFactory() |
152 : m_bInit(FALSE), m_nRef(0), m_pGlobalData(NULL), m_nGlobalDataCount(0) {} | 152 : m_bInit(FALSE), m_nRef(0), m_pGlobalData(NULL), m_nGlobalDataCount(0) {} |
153 ~CJS_RuntimeFactory(); | 153 ~CJS_RuntimeFactory(); |
154 IFXJS_Runtime* NewJSRuntime(CPDFDoc_Environment* pApp); | 154 IFXJS_Runtime* NewJSRuntime(CPDFDoc_Environment* pApp); |
155 void DeleteJSRuntime(IFXJS_Runtime* pRuntime); | 155 void DeleteJSRuntime(IFXJS_Runtime* pRuntime); |
156 void AddRef(); | 156 void AddRef(); |
157 void Release(); | 157 void Release(); |
158 | 158 |
159 CJS_GlobalData* NewGlobalData(CPDFDoc_Environment* pApp); | |
160 void ReleaseGlobalData(); | |
161 | |
162 private: | 159 private: |
163 FX_BOOL m_bInit; | 160 FX_BOOL m_bInit; |
164 int m_nRef; | 161 int m_nRef; |
165 CJS_GlobalData* m_pGlobalData; | 162 CJS_GlobalData* m_pGlobalData; |
166 int32_t m_nGlobalDataCount; | 163 int32_t m_nGlobalDataCount; |
167 }; | 164 }; |
168 | 165 |
169 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ | 166 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ |
OLD | NEW |