Remove pointless CPDFSDK_PageView usage in CJS_Object / CJS_EmbedObj.
[pdfium.git] / fpdfsdk / include / javascript / IJavaScript.h
index 53a4225..3791b88 100644 (file)
 #include "../../../core/include/fxcrt/fx_string.h"
 #include "../../../core/include/fxcrt/fx_system.h"
 
-class CPDF_Bookmark;
-class CPDF_FormField;
+class CPDFDoc_Environment;
 class CPDFSDK_Annot;
 class CPDFSDK_Document;
+class CPDF_Bookmark;
+class CPDF_FormField;
 
 class IFXJS_Context {
  public:
-  virtual ~IFXJS_Context() {}
-  virtual FX_BOOL Compile(const CFX_WideString& script,
-                          CFX_WideString& info) = 0;
   virtual FX_BOOL RunScript(const CFX_WideString& script,
                             CFX_WideString& info) = 0;
 
@@ -128,42 +126,20 @@ class IFXJS_Context {
   virtual void OnExternal_Exec() = 0;
 
   virtual void EnableMessageBox(FX_BOOL bEnable) = 0;
+
+ protected:
+  virtual ~IFXJS_Context() {}
 };
 
 class IFXJS_Runtime {
  public:
+  virtual ~IFXJS_Runtime() {}
+
   virtual IFXJS_Context* NewContext() = 0;
   virtual void ReleaseContext(IFXJS_Context* pContext) = 0;
   virtual IFXJS_Context* GetCurrentContext() = 0;
-
   virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0;
   virtual CPDFSDK_Document* GetReaderDocument() = 0;
-
- protected:
-  ~IFXJS_Runtime() {}
-};
-
-class CPDFDoc_Environment;
-class CJS_GlobalData;
-
-class CJS_RuntimeFactory {
- public:
-  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);
-  void AddRef();
-  void Release();
-
-  CJS_GlobalData* NewGlobalData(CPDFDoc_Environment* pApp);
-  void ReleaseGlobalData();
-
- private:
-  FX_BOOL m_bInit;
-  int m_nRef;
-  CJS_GlobalData* m_pGlobalData;
-  int32_t m_nGlobalDataCount;
 };
 
 #endif  // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_