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

Side by Side Diff: fpdfsdk/fpdfxfa/cpdfxfa_context.h

Issue 2469813004: Rename CPDFXFA_Document to CPDFXFA_Context (Closed)
Patch Set: Merge to master Created 4 years, 1 month 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 | « fpdfsdk/fpdfview.cpp ('k') | fpdfsdk/fpdfxfa/cpdfxfa_context.cpp » ('j') | no next file with comments »
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 FPDFSDK_FPDFXFA_CPDFXFA_DOCUMENT_H_ 7 #ifndef FPDFSDK_FPDFXFA_CPDFXFA_CONTEXT_H_
8 #define FPDFSDK_FPDFXFA_CPDFXFA_DOCUMENT_H_ 8 #define FPDFSDK_FPDFXFA_CPDFXFA_CONTEXT_H_
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h" 12 #include "fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h"
13 #include "xfa/fxfa/xfa_ffdoc.h" 13 #include "xfa/fxfa/xfa_ffdoc.h"
14 14
15 class CJS_Runtime; 15 class CJS_Runtime;
16 class CPDFSDK_FormFillEnvironment; 16 class CPDFSDK_FormFillEnvironment;
17 class CPDFXFA_Page; 17 class CPDFXFA_Page;
18 class CXFA_FFDocHandler; 18 class CXFA_FFDocHandler;
19 class IJS_Runtime; 19 class IJS_Runtime;
20 class IJS_Context; 20 class IJS_Context;
21 21
22 enum LoadStatus { 22 enum LoadStatus {
23 FXFA_LOADSTATUS_PRELOAD = 0, 23 FXFA_LOADSTATUS_PRELOAD = 0,
24 FXFA_LOADSTATUS_LOADING, 24 FXFA_LOADSTATUS_LOADING,
25 FXFA_LOADSTATUS_LOADED, 25 FXFA_LOADSTATUS_LOADED,
26 FXFA_LOADSTATUS_CLOSING, 26 FXFA_LOADSTATUS_CLOSING,
27 FXFA_LOADSTATUS_CLOSED 27 FXFA_LOADSTATUS_CLOSED
28 }; 28 };
29 29
30 class CPDFXFA_Document : public IXFA_AppProvider { 30 class CPDFXFA_Context : public IXFA_AppProvider {
31 public: 31 public:
32 CPDFXFA_Document(std::unique_ptr<CPDF_Document> pPDFDoc); 32 CPDFXFA_Context(std::unique_ptr<CPDF_Document> pPDFDoc);
33 ~CPDFXFA_Document() override; 33 ~CPDFXFA_Context() override;
34 34
35 FX_BOOL LoadXFADoc(); 35 FX_BOOL LoadXFADoc();
36 CPDF_Document* GetPDFDoc() { return m_pPDFDoc.get(); } 36 CPDF_Document* GetPDFDoc() { return m_pPDFDoc.get(); }
37 CXFA_FFDoc* GetXFADoc() { return m_pXFADoc.get(); } 37 CXFA_FFDoc* GetXFADoc() { return m_pXFADoc.get(); }
38 CXFA_FFDocView* GetXFADocView() { return m_pXFADocView; } 38 CXFA_FFDocView* GetXFADocView() { return m_pXFADocView; }
39 int GetDocType() const { return m_iDocType; } 39 int GetDocType() const { return m_iDocType; }
40 v8::Isolate* GetJSERuntime() const; 40 v8::Isolate* GetJSERuntime() const;
41 CXFA_FFApp* GetXFAApp() { return m_pXFAApp.get(); } 41 CXFA_FFApp* GetXFAApp() { return m_pXFAApp.get(); }
42 42
43 CPDFSDK_FormFillEnvironment* GetFormFillEnv() const { return m_pFormFillEnv; } 43 CPDFSDK_FormFillEnvironment* GetFormFillEnv() const { return m_pFormFillEnv; }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 CFX_ArrayTemplate<CPDFXFA_Page*>* GetXFAPageList() { return &m_XFAPageList; } 95 CFX_ArrayTemplate<CPDFXFA_Page*>* GetXFAPageList() { return &m_XFAPageList; }
96 96
97 private: 97 private:
98 void CloseXFADoc(); 98 void CloseXFADoc();
99 99
100 int m_iDocType; 100 int m_iDocType;
101 101
102 std::unique_ptr<CPDF_Document> m_pPDFDoc; 102 std::unique_ptr<CPDF_Document> m_pPDFDoc;
103 std::unique_ptr<CXFA_FFDoc> m_pXFADoc; 103 std::unique_ptr<CXFA_FFDoc> m_pXFADoc;
104 CPDFSDK_FormFillEnvironment* m_pFormFillEnv; // not owned. 104 CPDFSDK_FormFillEnvironment* m_pFormFillEnv; // not owned.
105 CXFA_FFDocView* m_pXFADocView; // not owned. 105 CXFA_FFDocView* m_pXFADocView; // not owned.
106 std::unique_ptr<CXFA_FFApp> m_pXFAApp; 106 std::unique_ptr<CXFA_FFApp> m_pXFAApp;
107 std::unique_ptr<CJS_Runtime> m_pRuntime; 107 std::unique_ptr<CJS_Runtime> m_pRuntime;
108 CFX_ArrayTemplate<CPDFXFA_Page*> m_XFAPageList; 108 CFX_ArrayTemplate<CPDFXFA_Page*> m_XFAPageList;
109 LoadStatus m_nLoadStatus; 109 LoadStatus m_nLoadStatus;
110 int m_nPageCount; 110 int m_nPageCount;
111 111
112 // Must be destroyed before |m_pFormFillEnv|. 112 // Must be destroyed before |m_pFormFillEnv|.
113 CPDFXFA_DocEnvironment m_DocEnv; 113 CPDFXFA_DocEnvironment m_DocEnv;
114 }; 114 };
115 115
116 #endif // FPDFSDK_FPDFXFA_CPDFXFA_DOCUMENT_H_ 116 #endif // FPDFSDK_FPDFXFA_CPDFXFA_CONTEXT_H_
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfview.cpp ('k') | fpdfsdk/fpdfxfa/cpdfxfa_context.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698