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

Side by Side Diff: xfa/fxfa/xfa_ffapp.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_checksum.h ('k') | xfa/fxfa/xfa_ffdoc.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_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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "core/fpdfapi/parser/cpdf_stream.h" 13 #include "core/fpdfapi/parser/cpdf_stream.h"
14 #include "core/fpdfapi/parser/cpdf_stream_acc.h" 14 #include "core/fpdfapi/parser/cpdf_stream_acc.h"
15 #include "core/fxcrt/cfx_retain_ptr.h"
15 #include "xfa/fgas/font/cfgas_fontmgr.h" 16 #include "xfa/fgas/font/cfgas_fontmgr.h"
16 #include "xfa/fwl/core/cfwl_app.h" 17 #include "xfa/fwl/core/cfwl_app.h"
17 #include "xfa/fxfa/fxfa.h" 18 #include "xfa/fxfa/fxfa.h"
18 19
19 class CXFA_DefFontMgr; 20 class CXFA_DefFontMgr;
20 class CXFA_FWLAdapterWidgetMgr; 21 class CXFA_FWLAdapterWidgetMgr;
21 class CXFA_FWLTheme; 22 class CXFA_FWLTheme;
22 class CXFA_FFDocHandler; 23 class CXFA_FFDocHandler;
23 class CXFA_FontMgr; 24 class CXFA_FontMgr;
24 class IFWL_AdapterTimerMgr; 25 class IFWL_AdapterTimerMgr;
25 class CFWL_WidgetMgrDelegate; 26 class CFWL_WidgetMgrDelegate;
26 27
27 // Layering prevents fxcrt from knowing about CPDF_Streams; this could go 28 // Layering prevents fxcrt from knowing about CPDF_Streams; this could go
28 // in fpdfsdk, but it is XFA-Only. 29 // in fpdfsdk, but it is XFA-Only.
29 IFX_SeekableReadStream* MakeSeekableReadStream( 30 CFX_RetainPtr<IFX_SeekableReadStream> MakeSeekableReadStream(
30 const std::vector<CPDF_Stream*>& streams); 31 const std::vector<CPDF_Stream*>& streams);
31 32
32 class CXFA_FFApp { 33 class CXFA_FFApp {
33 public: 34 public:
34 explicit CXFA_FFApp(IXFA_AppProvider* pProvider); 35 explicit CXFA_FFApp(IXFA_AppProvider* pProvider);
35 ~CXFA_FFApp(); 36 ~CXFA_FFApp();
36 37
37 CXFA_FFDoc* CreateDoc(IXFA_DocEnvironment* pDocEnvironment, 38 CXFA_FFDoc* CreateDoc(IXFA_DocEnvironment* pDocEnvironment,
38 IFX_SeekableReadStream* pStream, 39 const CFX_RetainPtr<IFX_SeekableReadStream>& pStream);
39 bool bTakeOverFile);
40 CXFA_FFDoc* CreateDoc(IXFA_DocEnvironment* pDocEnvironment, 40 CXFA_FFDoc* CreateDoc(IXFA_DocEnvironment* pDocEnvironment,
41 CPDF_Document* pPDFDoc); 41 CPDF_Document* pPDFDoc);
42 void SetDefaultFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr); 42 void SetDefaultFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr);
43 43
44 CXFA_FFDocHandler* GetDocHandler(); 44 CXFA_FFDocHandler* GetDocHandler();
45 CXFA_FWLAdapterWidgetMgr* GetWidgetMgr(CFWL_WidgetMgrDelegate* pDelegate); 45 CXFA_FWLAdapterWidgetMgr* GetWidgetMgr(CFWL_WidgetMgrDelegate* pDelegate);
46 CFGAS_FontMgr* GetFDEFontMgr(); 46 CFGAS_FontMgr* GetFDEFontMgr();
47 CXFA_FWLTheme* GetFWLTheme(); 47 CXFA_FWLTheme* GetFWLTheme();
48 48
49 IXFA_AppProvider* GetAppProvider() const { return m_pProvider; } 49 IXFA_AppProvider* GetAppProvider() const { return m_pProvider; }
(...skipping 29 matching lines...) Expand all
79 std::unique_ptr<CXFA_FWLAdapterWidgetMgr> m_pAdapterWidgetMgr; 79 std::unique_ptr<CXFA_FWLAdapterWidgetMgr> m_pAdapterWidgetMgr;
80 CFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate; // not owned. 80 CFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate; // not owned.
81 81
82 // |m_pFWLApp| has to be released first, then |m_pFWLTheme| since the former 82 // |m_pFWLApp| has to be released first, then |m_pFWLTheme| since the former
83 // may refers to theme manager and the latter refers to font manager. 83 // may refers to theme manager and the latter refers to font manager.
84 std::unique_ptr<CXFA_FWLTheme> m_pFWLTheme; 84 std::unique_ptr<CXFA_FWLTheme> m_pFWLTheme;
85 std::unique_ptr<CFWL_App> m_pFWLApp; 85 std::unique_ptr<CFWL_App> m_pFWLApp;
86 }; 86 };
87 87
88 #endif // XFA_FXFA_XFA_FFAPP_H_ 88 #endif // XFA_FXFA_XFA_FFAPP_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/xfa_checksum.h ('k') | xfa/fxfa/xfa_ffdoc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698