summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript/IJavaScript.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-09-21 16:29:20 -0700
committerTom Sepez <tsepez@chromium.org>2015-09-21 16:29:20 -0700
commitbca779d0957965eb2ebfad5479e0894844749626 (patch)
treec038cd9465f368563297840e8144265e909cc2ed /fpdfsdk/include/javascript/IJavaScript.h
parent270fc65d5824eeedbb2ed17516a72721bde9c9ef (diff)
downloadpdfium-bca779d0957965eb2ebfad5479e0894844749626.tar.xz
The Factory Design Pattern isn't buying us anything here over just new'ing the object we want. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1360523004 .
Diffstat (limited to 'fpdfsdk/include/javascript/IJavaScript.h')
-rw-r--r--fpdfsdk/include/javascript/IJavaScript.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h
index 47e4c17faf..3791b886c4 100644
--- a/fpdfsdk/include/javascript/IJavaScript.h
+++ b/fpdfsdk/include/javascript/IJavaScript.h
@@ -133,30 +133,13 @@ class 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:
- virtual ~IFXJS_Runtime() {}
-};
-
-class CJS_RuntimeFactory {
- public:
- CJS_RuntimeFactory() : m_bInit(false), m_nRef(0) {}
- ~CJS_RuntimeFactory();
-
- IFXJS_Runtime* NewJSRuntime(CPDFDoc_Environment* pApp);
- void DeleteJSRuntime(IFXJS_Runtime* pRuntime);
- void AddRef();
- void Release();
-
- private:
- bool m_bInit;
- int m_nRef;
};
#endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_