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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 virtual void OnExternal_Exec() = 0; | 126 virtual void OnExternal_Exec() = 0; |
127 | 127 |
128 virtual void EnableMessageBox(FX_BOOL bEnable) = 0; | 128 virtual void EnableMessageBox(FX_BOOL bEnable) = 0; |
129 | 129 |
130 protected: | 130 protected: |
131 virtual ~IFXJS_Context() {} | 131 virtual ~IFXJS_Context() {} |
132 }; | 132 }; |
133 | 133 |
134 class IFXJS_Runtime { | 134 class IFXJS_Runtime { |
135 public: | 135 public: |
| 136 static IFXJS_Runtime* Create(CPDFDoc_Environment* pEnv); |
136 virtual ~IFXJS_Runtime() {} | 137 virtual ~IFXJS_Runtime() {} |
137 | 138 |
138 virtual IFXJS_Context* NewContext() = 0; | 139 virtual IFXJS_Context* NewContext() = 0; |
139 virtual void ReleaseContext(IFXJS_Context* pContext) = 0; | 140 virtual void ReleaseContext(IFXJS_Context* pContext) = 0; |
140 virtual IFXJS_Context* GetCurrentContext() = 0; | 141 virtual IFXJS_Context* GetCurrentContext() = 0; |
141 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0; | 142 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0; |
142 virtual CPDFSDK_Document* GetReaderDocument() = 0; | 143 virtual CPDFSDK_Document* GetReaderDocument() = 0; |
| 144 |
| 145 protected: |
| 146 IFXJS_Runtime() {} |
143 }; | 147 }; |
144 | 148 |
145 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ | 149 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ |
OLD | NEW |