| 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 FPDFXFA_APP_H_ | 7 #ifndef FPDFXFA_APP_H_ |
| 8 #define FPDFXFA_APP_H_ | 8 #define FPDFXFA_APP_H_ |
| 9 | 9 |
| 10 class IFXJS_Runtime; | 10 class IFXJS_Runtime; |
| 11 class CJS_RuntimeFactory; | |
| 12 | 11 |
| 13 class CPDFXFA_App : public IXFA_AppProvider { | 12 class CPDFXFA_App : public IXFA_AppProvider { |
| 14 public: | 13 public: |
| 15 static CPDFXFA_App* GetInstance(); | 14 static CPDFXFA_App* GetInstance(); |
| 16 static void ReleaseInstance(); | 15 static void ReleaseInstance(); |
| 17 | 16 |
| 18 CPDFXFA_App(); | 17 CPDFXFA_App(); |
| 19 ~CPDFXFA_App() override; | 18 ~CPDFXFA_App() override; |
| 20 | 19 |
| 21 FX_BOOL Initialize(); | 20 FX_BOOL Initialize(); |
| 22 IXFA_App* GetXFAApp() { return m_pXFAApp; } | 21 IXFA_App* GetXFAApp() { return m_pXFAApp; } |
| 23 | 22 |
| 24 FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv); | 23 FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv); |
| 25 FX_BOOL RemoveFormFillEnv(CPDFDoc_Environment* pEnv); | 24 FX_BOOL RemoveFormFillEnv(CPDFDoc_Environment* pEnv); |
| 26 | 25 |
| 27 FXJSE_HRUNTIME GetJSERuntime() { return m_hJSERuntime; } | 26 FXJSE_HRUNTIME GetJSERuntime() { return m_hJSERuntime; } |
| 28 void ReleaseRuntime(); | 27 void ReleaseRuntime(); |
| 29 FX_BOOL InitRuntime(FX_BOOL bReset = FALSE); | 28 FX_BOOL InitRuntime(FX_BOOL bReset = FALSE); |
| 30 | 29 |
| 31 CJS_RuntimeFactory* GetRuntimeFactory() { return m_pJSRuntimeFactory; } | |
| 32 | |
| 33 // IFXA_AppProvider: | 30 // IFXA_AppProvider: |
| 34 void GetAppType(CFX_WideString& wsAppType) override; | 31 void GetAppType(CFX_WideString& wsAppType) override; |
| 35 void SetAppType(const CFX_WideStringC& wsAppType) override; | 32 void SetAppType(const CFX_WideStringC& wsAppType) override; |
| 36 | 33 |
| 37 void GetLanguage(CFX_WideString& wsLanguage) override; | 34 void GetLanguage(CFX_WideString& wsLanguage) override; |
| 38 void GetPlatform(CFX_WideString& wsPlatform) override; | 35 void GetPlatform(CFX_WideString& wsPlatform) override; |
| 39 void GetVariation(CFX_WideString& wsVariation) override; | 36 void GetVariation(CFX_WideString& wsVariation) override; |
| 40 void GetVersion(CFX_WideString& wsVersion) override; | 37 void GetVersion(CFX_WideString& wsVersion) override; |
| 41 void GetFoxitVersion(CFX_WideString& wsFoxitVersion) override { | 38 void GetFoxitVersion(CFX_WideString& wsFoxitVersion) override { |
| 42 wsFoxitVersion = L"7.0"; | 39 wsFoxitVersion = L"7.0"; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 CFX_ArrayTemplate<CPDFDoc_Environment*> m_pEnvList; | 79 CFX_ArrayTemplate<CPDFDoc_Environment*> m_pEnvList; |
| 83 | 80 |
| 84 protected: | 81 protected: |
| 85 static CPDFXFA_App* g_pApp; | 82 static CPDFXFA_App* g_pApp; |
| 86 | 83 |
| 87 FX_BOOL m_bInitRuntime; | 84 FX_BOOL m_bInitRuntime; |
| 88 IXFA_App* m_pXFAApp; | 85 IXFA_App* m_pXFAApp; |
| 89 IXFA_FontMgr* m_pFontMgr; | 86 IXFA_FontMgr* m_pFontMgr; |
| 90 FXJSE_HRUNTIME m_hJSERuntime; | 87 FXJSE_HRUNTIME m_hJSERuntime; |
| 91 IFXJS_Runtime* m_pJSRuntime; | 88 IFXJS_Runtime* m_pJSRuntime; |
| 92 CJS_RuntimeFactory* m_pJSRuntimeFactory; | |
| 93 CFX_WideString m_csAppType; | 89 CFX_WideString m_csAppType; |
| 94 }; | 90 }; |
| 95 | 91 |
| 96 #endif // FPDFXFA_APP_H_ | 92 #endif // FPDFXFA_APP_H_ |
| OLD | NEW |