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

Side by Side Diff: xfa/fxfa/include/xfa_ffapp.h

Issue 2430743003: in the attempt to fix 627393, changed IFX_FileRead's readBlock to return the length it reads
Patch Set: remove .tmp files Created 4 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
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_INCLUDE_XFA_FFAPP_H_ 7 #ifndef XFA_FXFA_INCLUDE_XFA_FFAPP_H_
8 #define XFA_FXFA_INCLUDE_XFA_FFAPP_H_ 8 #define XFA_FXFA_INCLUDE_XFA_FFAPP_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 11 matching lines...) Expand all
22 class CXFA_FFDocHandler; 22 class CXFA_FFDocHandler;
23 class CXFA_FontMgr; 23 class CXFA_FontMgr;
24 class IFWL_AdapterTimerMgr; 24 class IFWL_AdapterTimerMgr;
25 25
26 class CXFA_FileRead : public IFX_FileRead { 26 class CXFA_FileRead : public IFX_FileRead {
27 public: 27 public:
28 explicit CXFA_FileRead(const CFX_ArrayTemplate<CPDF_Stream*>& streams); 28 explicit CXFA_FileRead(const CFX_ArrayTemplate<CPDF_Stream*>& streams);
29 ~CXFA_FileRead() override; 29 ~CXFA_FileRead() override;
30 30
31 // IFX_FileRead 31 // IFX_FileRead
32 FX_BOOL IsEOF() override;
32 FX_FILESIZE GetSize() override; 33 FX_FILESIZE GetSize() override;
33 FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; 34 size_t ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
34 void Release() override; 35 void Release() override;
35 36
36 protected: 37 protected:
37 CFX_ObjectArray<CPDF_StreamAcc> m_Data; 38 CFX_ObjectArray<CPDF_StreamAcc> m_Data;
39 FX_FILESIZE m_FileSize;
40 FX_FILESIZE m_nCurPos;
38 }; 41 };
39 42
40 class CXFA_FFApp { 43 class CXFA_FFApp {
41 public: 44 public:
42 explicit CXFA_FFApp(IXFA_AppProvider* pProvider); 45 explicit CXFA_FFApp(IXFA_AppProvider* pProvider);
43 ~CXFA_FFApp(); 46 ~CXFA_FFApp();
44 47
45 CXFA_FFDoc* CreateDoc(IXFA_DocEnvironment* pDocEnvironment, 48 CXFA_FFDoc* CreateDoc(IXFA_DocEnvironment* pDocEnvironment,
46 IFX_FileRead* pStream, 49 IFX_FileRead* pStream,
47 FX_BOOL bTakeOverFile); 50 FX_BOOL bTakeOverFile);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 std::unique_ptr<CXFA_FWLAdapterWidgetMgr> m_pAdapterWidgetMgr; 87 std::unique_ptr<CXFA_FWLAdapterWidgetMgr> m_pAdapterWidgetMgr;
85 CFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate; // not owned. 88 CFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate; // not owned.
86 89
87 // |m_pFWLApp| has to be released first, then |m_pFWLTheme| since the former 90 // |m_pFWLApp| has to be released first, then |m_pFWLTheme| since the former
88 // may refers to theme manager and the latter refers to font manager. 91 // may refers to theme manager and the latter refers to font manager.
89 std::unique_ptr<CXFA_FWLTheme> m_pFWLTheme; 92 std::unique_ptr<CXFA_FWLTheme> m_pFWLTheme;
90 std::unique_ptr<IFWL_App> m_pFWLApp; 93 std::unique_ptr<IFWL_App> m_pFWLApp;
91 }; 94 };
92 95
93 #endif // XFA_FXFA_INCLUDE_XFA_FFAPP_H_ 96 #endif // XFA_FXFA_INCLUDE_XFA_FFAPP_H_
OLDNEW
« testing/libfuzzer/xfa_codec_fuzzer.h ('K') | « xfa/fxfa/app/xfa_ffapp.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698