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

Side by Side Diff: xfa/fxfa/xfa_ffdoc.h

Issue 2451493002: Refcount all the IFX_ stream classes all the time. (Closed)
Patch Set: Clean up cast expression Created 4 years 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 | « xfa/fxfa/xfa_ffapp.h ('k') | xfa/fxfa/xfa_ffwidget.h » ('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 XFA_FXFA_XFA_FFDOC_H_ 7 #ifndef XFA_FXFA_XFA_FFDOC_H_
8 #define XFA_FXFA_XFA_FFDOC_H_ 8 #define XFA_FXFA_XFA_FFDOC_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 22 matching lines...) Expand all
33 IXFA_DocEnvironment* GetDocEnvironment() const { return m_pDocEnvironment; } 33 IXFA_DocEnvironment* GetDocEnvironment() const { return m_pDocEnvironment; }
34 uint32_t GetDocType(); 34 uint32_t GetDocType();
35 void SetDocType(uint32_t dwType); 35 void SetDocType(uint32_t dwType);
36 36
37 int32_t StartLoad(); 37 int32_t StartLoad();
38 int32_t DoLoad(IFX_Pause* pPause = nullptr); 38 int32_t DoLoad(IFX_Pause* pPause = nullptr);
39 void StopLoad(); 39 void StopLoad();
40 40
41 CXFA_FFDocView* CreateDocView(uint32_t dwView = 0); 41 CXFA_FFDocView* CreateDocView(uint32_t dwView = 0);
42 42
43 bool OpenDoc(IFX_SeekableReadStream* pStream, bool bTakeOverFile); 43 bool OpenDoc(const CFX_RetainPtr<IFX_SeekableReadStream>& pStream);
44 bool OpenDoc(CPDF_Document* pPDFDoc); 44 bool OpenDoc(CPDF_Document* pPDFDoc);
45 bool CloseDoc(); 45 bool CloseDoc();
46 46
47 CXFA_Document* GetXFADoc() { return m_pDocumentParser->GetDocument(); } 47 CXFA_Document* GetXFADoc() { return m_pDocumentParser->GetDocument(); }
48 CXFA_FFApp* GetApp() { return m_pApp; } 48 CXFA_FFApp* GetApp() { return m_pApp; }
49 CXFA_FFDocView* GetDocView(CXFA_LayoutProcessor* pLayout); 49 CXFA_FFDocView* GetDocView(CXFA_LayoutProcessor* pLayout);
50 CXFA_FFDocView* GetDocView(); 50 CXFA_FFDocView* GetDocView();
51 CPDF_Document* GetPDFDoc(); 51 CPDF_Document* GetPDFDoc();
52 CFX_DIBitmap* GetPDFNamedImage(const CFX_WideStringC& wsName, 52 CFX_DIBitmap* GetPDFNamedImage(const CFX_WideStringC& wsName,
53 int32_t& iImageXDpi, 53 int32_t& iImageXDpi,
54 int32_t& iImageYDpi); 54 int32_t& iImageYDpi);
55 55
56 bool SavePackage(XFA_HashCode code, 56 bool SavePackage(XFA_HashCode code,
57 IFX_SeekableWriteStream* pFile, 57 const CFX_RetainPtr<IFX_SeekableWriteStream>& pFile,
58 CXFA_ChecksumContext* pCSContext); 58 CXFA_ChecksumContext* pCSContext);
59 bool ImportData(IFX_SeekableReadStream* pStream, bool bXDP = true); 59 bool ImportData(const CFX_RetainPtr<IFX_SeekableReadStream>& pStream,
60 bool bXDP = true);
60 61
61 protected: 62 protected:
62 IXFA_DocEnvironment* const m_pDocEnvironment; 63 IXFA_DocEnvironment* const m_pDocEnvironment;
63 std::unique_ptr<CXFA_DocumentParser> m_pDocumentParser; 64 std::unique_ptr<CXFA_DocumentParser> m_pDocumentParser;
64 IFX_SeekableReadStream* m_pStream; 65 CFX_RetainPtr<IFX_SeekableReadStream> m_pStream;
65 CXFA_FFApp* m_pApp; 66 CXFA_FFApp* m_pApp;
66 std::unique_ptr<CXFA_FFNotify> m_pNotify; 67 std::unique_ptr<CXFA_FFNotify> m_pNotify;
67 CPDF_Document* m_pPDFDoc; 68 CPDF_Document* m_pPDFDoc;
68 std::map<uint32_t, FX_IMAGEDIB_AND_DPI> m_HashToDibDpiMap; 69 std::map<uint32_t, FX_IMAGEDIB_AND_DPI> m_HashToDibDpiMap;
69 std::map<uint32_t, std::unique_ptr<CXFA_FFDocView>> m_TypeToDocViewMap; 70 std::map<uint32_t, std::unique_ptr<CXFA_FFDocView>> m_TypeToDocViewMap;
70 uint32_t m_dwDocType; 71 uint32_t m_dwDocType;
71 bool m_bOwnStream;
72 }; 72 };
73 73
74 #endif // XFA_FXFA_XFA_FFDOC_H_ 74 #endif // XFA_FXFA_XFA_FFDOC_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/xfa_ffapp.h ('k') | xfa/fxfa/xfa_ffwidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698