OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_IJS_RUNTIME_H_ | 7 #ifndef FPDFSDK_JAVASCRIPT_IJS_RUNTIME_H_ |
8 #define FPDFSDK_JAVASCRIPT_IJS_RUNTIME_H_ | 8 #define FPDFSDK_JAVASCRIPT_IJS_RUNTIME_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_string.h" | 10 #include "core/fxcrt/include/fx_string.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 public: | 23 public: |
24 static void Initialize(unsigned int slot, void* isolate); | 24 static void Initialize(unsigned int slot, void* isolate); |
25 static IJS_Runtime* Create(CPDFDoc_Environment* pEnv); | 25 static IJS_Runtime* Create(CPDFDoc_Environment* pEnv); |
26 virtual ~IJS_Runtime() {} | 26 virtual ~IJS_Runtime() {} |
27 | 27 |
28 virtual IJS_Context* NewContext() = 0; | 28 virtual IJS_Context* NewContext() = 0; |
29 virtual void ReleaseContext(IJS_Context* pContext) = 0; | 29 virtual void ReleaseContext(IJS_Context* pContext) = 0; |
30 virtual IJS_Context* GetCurrentContext() = 0; | 30 virtual IJS_Context* GetCurrentContext() = 0; |
31 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0; | 31 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0; |
32 virtual CPDFSDK_Document* GetReaderDocument() = 0; | 32 virtual CPDFSDK_Document* GetReaderDocument() = 0; |
33 virtual int Execute(IJS_Context* cc, | 33 virtual int Execute(const CFX_WideString& script, CFX_WideString* info) = 0; |
34 const wchar_t* script, | |
35 CFX_WideString* info) = 0; | |
36 | 34 |
37 #ifdef PDF_ENABLE_XFA | 35 #ifdef PDF_ENABLE_XFA |
38 virtual FX_BOOL GetValueByName(const CFX_ByteStringC& utf8Name, | 36 virtual FX_BOOL GetValueByName(const CFX_ByteStringC& utf8Name, |
39 CFXJSE_Value* pValue) = 0; | 37 CFXJSE_Value* pValue) = 0; |
40 virtual FX_BOOL SetValueByName(const CFX_ByteStringC& utf8Name, | 38 virtual FX_BOOL SetValueByName(const CFX_ByteStringC& utf8Name, |
41 CFXJSE_Value* pValue) = 0; | 39 CFXJSE_Value* pValue) = 0; |
42 #endif // PDF_ENABLE_XFA | 40 #endif // PDF_ENABLE_XFA |
43 | 41 |
44 protected: | 42 protected: |
45 IJS_Runtime() {} | 43 IJS_Runtime() {} |
46 }; | 44 }; |
47 | 45 |
48 #endif // FPDFSDK_JAVASCRIPT_IJS_RUNTIME_H_ | 46 #endif // FPDFSDK_JAVASCRIPT_IJS_RUNTIME_H_ |
OLD | NEW |