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

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: rebase Created 5 years, 2 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/include/javascript/JS_Define.h » ('j') | xfa/src/fxjse/src/runtime.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 11
12 class CPDFXFA_App : public IXFA_AppProvider { 12 class CPDFXFA_App : public IXFA_AppProvider {
13 public: 13 public:
14 static CPDFXFA_App* GetInstance(); 14 static CPDFXFA_App* GetInstance();
15 static void ReleaseInstance(); 15 static void ReleaseInstance();
16 16
17 CPDFXFA_App(); 17 CPDFXFA_App();
18 ~CPDFXFA_App() override; 18 ~CPDFXFA_App() override;
19 19
20 FX_BOOL Initialize(); 20 FX_BOOL Initialize();
21 IXFA_App* GetXFAApp() { return m_pXFAApp; } 21 IXFA_App* GetXFAApp() { return m_pXFAApp; }
22 22
23 FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv); 23 FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv);
24 FX_BOOL RemoveFormFillEnv(CPDFDoc_Environment* pEnv); 24 FX_BOOL RemoveFormFillEnv(CPDFDoc_Environment* pEnv);
25 25
26 FXJSE_HRUNTIME GetJSERuntime() { return m_hJSERuntime; } 26 FX_BOOL IsJavaScriptInitialized() const { return m_bJavaScriptInitialized; }
27 void ReleaseRuntime(); 27 void SetJavaScriptInitialized(FX_BOOL bInitialized) {
28 FX_BOOL InitRuntime(FX_BOOL bReset = FALSE); 28 m_bJavaScriptInitialized = bInitialized;
29 }
30
31 FXJSE_HRUNTIME GetJSERuntime() const { return m_hJSERuntime; }
29 32
30 // IFXA_AppProvider: 33 // IFXA_AppProvider:
31 void GetAppType(CFX_WideString& wsAppType) override; 34 void GetAppType(CFX_WideString& wsAppType) override;
32 void SetAppType(const CFX_WideStringC& wsAppType) override; 35 void SetAppType(const CFX_WideStringC& wsAppType) override;
33 36
34 void GetLanguage(CFX_WideString& wsLanguage) override; 37 void GetLanguage(CFX_WideString& wsLanguage) override;
35 void GetPlatform(CFX_WideString& wsPlatform) override; 38 void GetPlatform(CFX_WideString& wsPlatform) override;
36 void GetVariation(CFX_WideString& wsVariation) override; 39 void GetVariation(CFX_WideString& wsVariation) override;
37 void GetVersion(CFX_WideString& wsVersion) override; 40 void GetVersion(CFX_WideString& wsVersion) override;
38 void GetFoxitVersion(CFX_WideString& wsFoxitVersion) override { 41 void GetFoxitVersion(CFX_WideString& wsFoxitVersion) override {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const CFX_WideStringC& wsFilter, 77 const CFX_WideStringC& wsFilter,
75 CFX_WideStringArray& wsPathArr, 78 CFX_WideStringArray& wsPathArr,
76 FX_BOOL bOpen) override; 79 FX_BOOL bOpen) override;
77 IFWL_AdapterTimerMgr* GetTimerMgr() override; 80 IFWL_AdapterTimerMgr* GetTimerMgr() override;
78 81
79 CFX_ArrayTemplate<CPDFDoc_Environment*> m_pEnvList; 82 CFX_ArrayTemplate<CPDFDoc_Environment*> m_pEnvList;
80 83
81 protected: 84 protected:
82 static CPDFXFA_App* g_pApp; 85 static CPDFXFA_App* g_pApp;
83 86
84 FX_BOOL m_bInitRuntime; 87 FX_BOOL m_bJavaScriptInitialized;
85 IXFA_App* m_pXFAApp; 88 IXFA_App* m_pXFAApp;
86 IXFA_FontMgr* m_pFontMgr; 89 IXFA_FontMgr* m_pFontMgr;
87 FXJSE_HRUNTIME m_hJSERuntime; 90 FXJSE_HRUNTIME m_hJSERuntime;
88 IFXJS_Runtime* m_pJSRuntime; 91 IFXJS_Runtime* m_pJSRuntime;
89 CFX_WideString m_csAppType; 92 CFX_WideString m_csAppType;
90 }; 93 };
91 94
92 #endif // FPDFXFA_APP_H_ 95 #endif // FPDFXFA_APP_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/include/javascript/JS_Define.h » ('j') | xfa/src/fxjse/src/runtime.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698