| 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_FPDFXFA_INCLUDE_FPDFXFA_APP_H_ | 7 #ifndef FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_APP_H_ |
| 8 #define FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_APP_H_ | 8 #define FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_APP_H_ |
| 9 | 9 |
| 10 #include "xfa/fxfa/include/fxfa.h" | 10 #include "xfa/fxfa/include/fxfa.h" |
| 11 | 11 |
| 12 class CPDFDoc_Environment; | 12 class CPDFSDK_Environment; |
| 13 class IFXJS_Runtime; | 13 class IFXJS_Runtime; |
| 14 | 14 |
| 15 class CPDFXFA_App : public IXFA_AppProvider { | 15 class CPDFXFA_App : public IXFA_AppProvider { |
| 16 public: | 16 public: |
| 17 static CPDFXFA_App* GetInstance(); | 17 static CPDFXFA_App* GetInstance(); |
| 18 static void ReleaseInstance(); | 18 static void ReleaseInstance(); |
| 19 | 19 |
| 20 CPDFXFA_App(); | 20 CPDFXFA_App(); |
| 21 ~CPDFXFA_App() override; | 21 ~CPDFXFA_App() override; |
| 22 | 22 |
| 23 FX_BOOL Initialize(v8::Isolate* pIsolate); | 23 FX_BOOL Initialize(v8::Isolate* pIsolate); |
| 24 CXFA_FFApp* GetXFAApp() { return m_pXFAApp.get(); } | 24 CXFA_FFApp* GetXFAApp() { return m_pXFAApp.get(); } |
| 25 | 25 |
| 26 FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv); | 26 FX_BOOL AddFormFillEnv(CPDFSDK_Environment* pEnv); |
| 27 FX_BOOL RemoveFormFillEnv(CPDFDoc_Environment* pEnv); | 27 FX_BOOL RemoveFormFillEnv(CPDFSDK_Environment* pEnv); |
| 28 | 28 |
| 29 FX_BOOL IsJavaScriptInitialized() const { return m_bJavaScriptInitialized; } | 29 FX_BOOL IsJavaScriptInitialized() const { return m_bJavaScriptInitialized; } |
| 30 void SetJavaScriptInitialized(FX_BOOL bInitialized) { | 30 void SetJavaScriptInitialized(FX_BOOL bInitialized) { |
| 31 m_bJavaScriptInitialized = bInitialized; | 31 m_bJavaScriptInitialized = bInitialized; |
| 32 } | 32 } |
| 33 | 33 |
| 34 v8::Isolate* GetJSERuntime() const { return m_pIsolate; } | 34 v8::Isolate* GetJSERuntime() const { return m_pIsolate; } |
| 35 | 35 |
| 36 // IFXA_AppProvider: | 36 // IFXA_AppProvider: |
| 37 void GetAppType(CFX_WideString& wsAppType) override; | 37 void GetAppType(CFX_WideString& wsAppType) override; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 63 const CFX_WideString& wsEncode, | 63 const CFX_WideString& wsEncode, |
| 64 const CFX_WideString& wsHeader, | 64 const CFX_WideString& wsHeader, |
| 65 CFX_WideString& wsResponse) override; | 65 CFX_WideString& wsResponse) override; |
| 66 FX_BOOL PutRequestURL(const CFX_WideString& wsURL, | 66 FX_BOOL PutRequestURL(const CFX_WideString& wsURL, |
| 67 const CFX_WideString& wsData, | 67 const CFX_WideString& wsData, |
| 68 const CFX_WideString& wsEncode) override; | 68 const CFX_WideString& wsEncode) override; |
| 69 | 69 |
| 70 void LoadString(int32_t iStringID, CFX_WideString& wsString) override; | 70 void LoadString(int32_t iStringID, CFX_WideString& wsString) override; |
| 71 IFWL_AdapterTimerMgr* GetTimerMgr() override; | 71 IFWL_AdapterTimerMgr* GetTimerMgr() override; |
| 72 | 72 |
| 73 CFX_ArrayTemplate<CPDFDoc_Environment*> m_pEnvList; | 73 CFX_ArrayTemplate<CPDFSDK_Environment*> m_pEnvList; |
| 74 | 74 |
| 75 protected: | 75 protected: |
| 76 FX_BOOL m_bJavaScriptInitialized; | 76 FX_BOOL m_bJavaScriptInitialized; |
| 77 std::unique_ptr<CXFA_FFApp> m_pXFAApp; | 77 std::unique_ptr<CXFA_FFApp> m_pXFAApp; |
| 78 v8::Isolate* m_pIsolate; | 78 v8::Isolate* m_pIsolate; |
| 79 CFX_WideString m_csAppType; | 79 CFX_WideString m_csAppType; |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 #endif // FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_APP_H_ | 82 #endif // FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_APP_H_ |
| OLD | NEW |