Index: fpdfsdk/include/javascript/IJavaScript.h |
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h |
index bf90210794d4a7b6e358e026c9fe4ffafede41a6..c4c5d0d053fd4a25a2baf190eae65a17517fe14d 100644 |
--- a/fpdfsdk/include/javascript/IJavaScript.h |
+++ b/fpdfsdk/include/javascript/IJavaScript.h |
@@ -16,10 +16,11 @@ class CPDFSDK_Document; |
class CPDF_Bookmark; |
class CPDF_FormField; |
+// Records the details of an event and triggers JS execution for it. |
class IJS_Context { |
public: |
virtual FX_BOOL RunScript(const CFX_WideString& script, |
- CFX_WideString& info) = 0; |
+ CFX_WideString* info) = 0; |
virtual void OnApp_Init() = 0; |
@@ -131,6 +132,7 @@ class IJS_Context { |
virtual ~IJS_Context() {} |
}; |
+// Owns the FJXS objects needed to actually execute JS. |
class IJS_Runtime { |
public: |
static void Initialize(unsigned int slot, void* isolate); |
@@ -142,6 +144,9 @@ class IJS_Runtime { |
virtual IJS_Context* GetCurrentContext() = 0; |
virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0; |
virtual CPDFSDK_Document* GetReaderDocument() = 0; |
+ virtual int Execute(IJS_Context* cc, |
+ const wchar_t* script, |
+ CFX_WideString* info) = 0; |
protected: |
IJS_Runtime() {} |