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

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

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