| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef FPDFSDK_FPDFXFA_CPDFXFA_APP_H_ | |
| 8 #define FPDFSDK_FPDFXFA_CPDFXFA_APP_H_ | |
| 9 | |
| 10 #include "third_party/base/ptr_util.h" | |
| 11 #include "xfa/fxfa/fxfa.h" | |
| 12 | |
| 13 class CPDFSDK_FormFillEnvironment; | |
| 14 class CJS_Runtime; | |
| 15 | |
| 16 class CPDFXFA_App : public IXFA_AppProvider { | |
| 17 public: | |
| 18 CPDFXFA_App(); | |
| 19 ~CPDFXFA_App() override; | |
| 20 | |
| 21 CXFA_FFApp* GetXFAApp() { return m_pXFAApp.get(); } | |
| 22 | |
| 23 void SetFormFillEnv(CPDFSDK_FormFillEnvironment* pFormFillEnv); | |
| 24 | |
| 25 v8::Isolate* GetJSERuntime() const; | |
| 26 | |
| 27 // IFXA_AppProvider: | |
| 28 void GetLanguage(CFX_WideString& wsLanguage) override; | |
| 29 void GetPlatform(CFX_WideString& wsPlatform) override; | |
| 30 void GetAppName(CFX_WideString& wsName) override; | |
| 31 | |
| 32 void Beep(uint32_t dwType) override; | |
| 33 int32_t MsgBox(const CFX_WideString& wsMessage, | |
| 34 const CFX_WideString& wsTitle, | |
| 35 uint32_t dwIconType, | |
| 36 uint32_t dwButtonType) override; | |
| 37 CFX_WideString Response(const CFX_WideString& wsQuestion, | |
| 38 const CFX_WideString& wsTitle, | |
| 39 const CFX_WideString& wsDefaultAnswer, | |
| 40 FX_BOOL bMark) override; | |
| 41 | |
| 42 IFX_SeekableReadStream* DownloadURL(const CFX_WideString& wsURL) override; | |
| 43 FX_BOOL PostRequestURL(const CFX_WideString& wsURL, | |
| 44 const CFX_WideString& wsData, | |
| 45 const CFX_WideString& wsContentType, | |
| 46 const CFX_WideString& wsEncode, | |
| 47 const CFX_WideString& wsHeader, | |
| 48 CFX_WideString& wsResponse) override; | |
| 49 FX_BOOL PutRequestURL(const CFX_WideString& wsURL, | |
| 50 const CFX_WideString& wsData, | |
| 51 const CFX_WideString& wsEncode) override; | |
| 52 | |
| 53 void LoadString(int32_t iStringID, CFX_WideString& wsString) override; | |
| 54 IFWL_AdapterTimerMgr* GetTimerMgr() override; | |
| 55 | |
| 56 private: | |
| 57 CPDFSDK_FormFillEnvironment* m_pFormFillEnv; // Not owned. | |
| 58 std::unique_ptr<CXFA_FFApp> m_pXFAApp; | |
| 59 }; | |
| 60 | |
| 61 #endif // FPDFSDK_FPDFXFA_CPDFXFA_APP_H_ | |
| OLD | NEW |