Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: fpdfsdk/include/fpdfxfa/fpdfxfa_app.h

Issue 1351173002: XFA: contention between FXJSE and FXJS over isolate data slots (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp » ('j') | fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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; 11 class CJS_RuntimeFactory;
12 12
13 class CPDFXFA_App : public IXFA_AppProvider { 13 class CPDFXFA_App : public IXFA_AppProvider {
14 public: 14 public:
15 static CPDFXFA_App* GetInstance(); 15 static CPDFXFA_App* GetInstance();
16 static void ReleaseInstance(); 16 static void ReleaseInstance();
17 17
18 CPDFXFA_App(); 18 CPDFXFA_App();
19 ~CPDFXFA_App() override; 19 ~CPDFXFA_App() override;
20 20
21 FX_BOOL Initialize(); 21 FX_BOOL Initialize();
22 IXFA_App* GetXFAApp() { return m_pXFAApp; } 22 IXFA_App* GetXFAApp() { return m_pXFAApp; }
23 23
24 FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv); 24 FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv);
25 FX_BOOL RemoveFormFillEnv(CPDFDoc_Environment* pEnv); 25 FX_BOOL RemoveFormFillEnv(CPDFDoc_Environment* pEnv);
26 26
27 FXJSE_HRUNTIME GetJSERuntime() { return m_hJSERuntime; } 27 FX_BOOL IsJavaScriptInitialized() const { return m_bJavaScriptInitialized; }
28 void ReleaseRuntime(); 28 void SetJavaScriptInitialized(FX_BOOL bInitialized) {
29 FX_BOOL InitRuntime(FX_BOOL bReset = FALSE); 29 m_bJavaScriptInitialized = bInitialized;
30 }
30 31
31 CJS_RuntimeFactory* GetRuntimeFactory() { return m_pJSRuntimeFactory; } 32 FXJSE_HRUNTIME GetJSERuntime() const { return m_hJSERuntime; }
33 CJS_RuntimeFactory* GetRuntimeFactory() const { return m_pJSRuntimeFactory; }
32 34
33 // IFXA_AppProvider: 35 // IFXA_AppProvider:
34 void GetAppType(CFX_WideString& wsAppType) override; 36 void GetAppType(CFX_WideString& wsAppType) override;
35 void SetAppType(const CFX_WideStringC& wsAppType) override; 37 void SetAppType(const CFX_WideStringC& wsAppType) override;
36 38
37 void GetLanguage(CFX_WideString& wsLanguage) override; 39 void GetLanguage(CFX_WideString& wsLanguage) override;
38 void GetPlatform(CFX_WideString& wsPlatform) override; 40 void GetPlatform(CFX_WideString& wsPlatform) override;
39 void GetVariation(CFX_WideString& wsVariation) override; 41 void GetVariation(CFX_WideString& wsVariation) override;
40 void GetVersion(CFX_WideString& wsVersion) override; 42 void GetVersion(CFX_WideString& wsVersion) override;
41 void GetFoxitVersion(CFX_WideString& wsFoxitVersion) override { 43 void GetFoxitVersion(CFX_WideString& wsFoxitVersion) override {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const CFX_WideStringC& wsFilter, 79 const CFX_WideStringC& wsFilter,
78 CFX_WideStringArray& wsPathArr, 80 CFX_WideStringArray& wsPathArr,
79 FX_BOOL bOpen) override; 81 FX_BOOL bOpen) override;
80 IFWL_AdapterTimerMgr* GetTimerMgr() override; 82 IFWL_AdapterTimerMgr* GetTimerMgr() override;
81 83
82 CFX_ArrayTemplate<CPDFDoc_Environment*> m_pEnvList; 84 CFX_ArrayTemplate<CPDFDoc_Environment*> m_pEnvList;
83 85
84 protected: 86 protected:
85 static CPDFXFA_App* g_pApp; 87 static CPDFXFA_App* g_pApp;
86 88
87 FX_BOOL m_bInitRuntime; 89 FX_BOOL m_bJavaScriptInitialized;
88 IXFA_App* m_pXFAApp; 90 IXFA_App* m_pXFAApp;
89 IXFA_FontMgr* m_pFontMgr; 91 IXFA_FontMgr* m_pFontMgr;
90 FXJSE_HRUNTIME m_hJSERuntime; 92 FXJSE_HRUNTIME m_hJSERuntime;
91 IFXJS_Runtime* m_pJSRuntime; 93 IFXJS_Runtime* m_pJSRuntime;
92 CJS_RuntimeFactory* m_pJSRuntimeFactory; 94 CJS_RuntimeFactory* m_pJSRuntimeFactory;
93 CFX_WideString m_csAppType; 95 CFX_WideString m_csAppType;
94 }; 96 };
95 97
96 #endif // FPDFXFA_APP_H_ 98 #endif // FPDFXFA_APP_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp » ('j') | fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698