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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 class IJS_Runtime { | 137 class IJS_Runtime { |
138 public: | 138 public: |
139 static void Initialize(unsigned int slot, void* isolate); | 139 static void Initialize(unsigned int slot, void* isolate); |
140 static IJS_Runtime* Create(CPDFDoc_Environment* pEnv); | 140 static IJS_Runtime* Create(CPDFDoc_Environment* pEnv); |
141 virtual ~IJS_Runtime() {} | 141 virtual ~IJS_Runtime() {} |
142 | 142 |
143 virtual IJS_Context* NewContext() = 0; | 143 virtual IJS_Context* NewContext() = 0; |
144 virtual void ReleaseContext(IJS_Context* pContext) = 0; | 144 virtual void ReleaseContext(IJS_Context* pContext) = 0; |
145 virtual IJS_Context* GetCurrentContext() = 0; | 145 virtual IJS_Context* GetCurrentContext() = 0; |
146 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0; | 146 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0; |
147 | |
148 virtual CPDFSDK_Document* GetReaderDocument() = 0; | 147 virtual CPDFSDK_Document* GetReaderDocument() = 0; |
149 virtual int Execute(IJS_Context* cc, | 148 virtual int Execute(IJS_Context* cc, |
150 const wchar_t* script, | 149 const wchar_t* script, |
151 CFX_WideString* info) = 0; | 150 CFX_WideString* info) = 0; |
152 | 151 |
153 virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name, | 152 virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name, |
154 FXJSE_HVALUE hValue) = 0; | 153 FXJSE_HVALUE hValue) = 0; |
155 virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name, | 154 virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name, |
156 FXJSE_HVALUE hValue) = 0; | 155 FXJSE_HVALUE hValue) = 0; |
157 | 156 |
158 protected: | 157 protected: |
159 IJS_Runtime() {} | 158 IJS_Runtime() {} |
160 }; | 159 }; |
161 | 160 |
162 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ | 161 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ |
OLD | NEW |