summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-01 11:22:37 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-01 11:22:37 -0700
commit8837c91c0db8f9205b7e58db97946e9af7958b39 (patch)
treeaa23430c284fe741685327e4f4704b2846514c54 /xfa
parentfcb1728c35f97a67fa0297f12bb13d3cafb01fe1 (diff)
downloadpdfium-8837c91c0db8f9205b7e58db97946e9af7958b39.tar.xz
Reland: Make the CPDFXFA_App non-globalchromium/2907
This reverts commit a282c7380f3964de41ea93c9980b12c4513d3473. This CL changes CPDFXFA_App from a global object to a child of the CPDFXFA_Document objects. BUG=pdfium:623 Review-Url: https://codereview.chromium.org/2421603002
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/parser/cxfa_scriptcontext.cpp1
-rw-r--r--xfa/fxfa/xfa_ffdoc.h7
2 files changed, 7 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_scriptcontext.cpp b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
index e7d45e3074..af2f99a55c 100644
--- a/xfa/fxfa/parser/cxfa_scriptcontext.cpp
+++ b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
@@ -135,6 +135,7 @@ CXFA_ScriptContext::~CXFA_ScriptContext() {
m_upObjectArray.RemoveAll();
}
+
void CXFA_ScriptContext::Initialize(v8::Isolate* pIsolate) {
m_pIsolate = pIsolate;
DefineJsContext();
diff --git a/xfa/fxfa/xfa_ffdoc.h b/xfa/fxfa/xfa_ffdoc.h
index f1ecd909e3..3976f1d5fd 100644
--- a/xfa/fxfa/xfa_ffdoc.h
+++ b/xfa/fxfa/xfa_ffdoc.h
@@ -29,16 +29,21 @@ class CXFA_FFDoc {
public:
CXFA_FFDoc(CXFA_FFApp* pApp, IXFA_DocEnvironment* pDocEnvironment);
~CXFA_FFDoc();
+
IXFA_DocEnvironment* GetDocEnvironment() const { return m_pDocEnvironment; }
uint32_t GetDocType();
+ void SetDocType(uint32_t dwType);
+
int32_t StartLoad();
int32_t DoLoad(IFX_Pause* pPause = nullptr);
void StopLoad();
+
CXFA_FFDocView* CreateDocView(uint32_t dwView = 0);
+
FX_BOOL OpenDoc(IFX_SeekableReadStream* pStream, FX_BOOL bTakeOverFile);
FX_BOOL OpenDoc(CPDF_Document* pPDFDoc);
FX_BOOL CloseDoc();
- void SetDocType(uint32_t dwType);
+
CXFA_Document* GetXFADoc() { return m_pDocumentParser->GetDocument(); }
CXFA_FFApp* GetApp() { return m_pApp; }
CXFA_FFDocView* GetDocView(CXFA_LayoutProcessor* pLayout);