Merge to XFA: Return error information from pdfium to JS.
[pdfium.git] / fpdfsdk / include / javascript / IJavaScript.h
index fbd89d2..b0e21c9 100644 (file)
@@ -7,9 +7,13 @@
 #ifndef _IJAVASCRIPT_H_
 #define _IJAVASCRIPT_H_
 
-namespace v8 {
-class Platform;
-}
+#include "../../../core/include/fxcrt/fx_basic.h"
+#include "../../../xfa/include/fxjse/fxjse.h"
+
+class CPDF_Bookmark;
+class CPDF_FormField;
+class CPDFSDK_Annot;
+class CPDFSDK_Document;
 
 class IFXJS_Context
 {
@@ -78,16 +82,9 @@ public:
        virtual IFXJS_Context*          GetCurrentContext() = 0;
 
        virtual void                            SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0;
-       virtual CPDFSDK_Document*       GetReaderDocument() = 0;        
 
-       virtual void                            GetObjectNames(CFX_WideStringArray& array) = 0;
-       virtual void                            GetObjectConsts(const CFX_WideString& swObjName, CFX_WideStringArray& array) = 0;
-       virtual void                            GetObjectProps(const CFX_WideString& swObjName, CFX_WideStringArray& array) = 0;
-       virtual void                            GetObjectMethods(const CFX_WideString& swObjName, CFX_WideStringArray& array) = 0;
+       virtual CPDFSDK_Document*       GetReaderDocument() = 0;
 
-       virtual void                            Exit() = 0;
-       virtual void                            Enter() = 0;
-       virtual FX_BOOL                         IsEntered() = 0;
        virtual FX_BOOL                         GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;
        virtual FX_BOOL                         SetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue) = 0;
 
@@ -101,7 +98,7 @@ class CJS_GlobalData;
 class CJS_RuntimeFactory
 {
 public:
-       CJS_RuntimeFactory():m_bInit(FALSE),m_nRef(0),m_pGlobalData(NULL),m_nGlobalDataCount(0),m_platform(NULL) {}
+       CJS_RuntimeFactory():m_bInit(FALSE),m_nRef(0),m_pGlobalData(NULL),m_nGlobalDataCount(0) {}
        ~CJS_RuntimeFactory();
        IFXJS_Runtime*                                  NewJSRuntime(CPDFDoc_Environment* pApp);
        void                                                    DeleteJSRuntime(IFXJS_Runtime* pRuntime);
@@ -115,7 +112,6 @@ private:
        int m_nRef;
        CJS_GlobalData*                                 m_pGlobalData;
        FX_INT32                                                m_nGlobalDataCount;
-        v8::Platform*                                          m_platform;
 };
 
 #endif //_IJAVASCRIPT_H_