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

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

Issue 1857893002: Cleanup the FF Handler proxy methods. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « xfa/fxfa/app/xfa_rendercontext.cpp ('k') | xfa/include/fxfa/xfa_ffdochandler.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_INCLUDE_FXFA_XFA_FFAPP_H_ 7 #ifndef XFA_INCLUDE_FXFA_XFA_FFAPP_H_
8 #define XFA_INCLUDE_FXFA_XFA_FFAPP_H_ 8 #define XFA_INCLUDE_FXFA_XFA_FFAPP_H_
9 9
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h"
11 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" 11 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h"
12 #include "xfa/fgas/font/fgas_font.h" 12 #include "xfa/fgas/font/fgas_font.h"
13 #include "xfa/fwl/core/fwl_sdadapterimp.h" 13 #include "xfa/fwl/core/fwl_sdadapterimp.h"
14 #include "xfa/fwl/core/ifwl_adapternative.h" 14 #include "xfa/fwl/core/ifwl_adapternative.h"
15 #include "xfa/fwl/core/ifwl_app.h" 15 #include "xfa/fwl/core/ifwl_app.h"
16 #include "xfa/include/fxfa/fxfa.h" 16 #include "xfa/include/fxfa/fxfa.h"
17 17
18 class CXFA_DefFontMgr; 18 class CXFA_DefFontMgr;
19 class CXFA_FWLAdapterWidgetMgr; 19 class CXFA_FWLAdapterWidgetMgr;
20 class CXFA_FWLTheme; 20 class CXFA_FWLTheme;
21 class CXFA_FFDocHandler; 21 class CXFA_FFDocHandler;
22 class CXFA_FFMenuHandler;
23 class CXFA_FontMgr; 22 class CXFA_FontMgr;
24 23
25 class CXFA_FileRead : public IFX_FileRead { 24 class CXFA_FileRead : public IFX_FileRead {
26 public: 25 public:
27 explicit CXFA_FileRead(const CFX_ArrayTemplate<CPDF_Stream*>& streams); 26 explicit CXFA_FileRead(const CFX_ArrayTemplate<CPDF_Stream*>& streams);
28 27
29 virtual FX_FILESIZE GetSize(); 28 virtual FX_FILESIZE GetSize();
30 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size); 29 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size);
31 30
32 virtual void Release() { delete this; } 31 virtual void Release() { delete this; }
33 32
34 protected: 33 protected:
35 CFX_ObjectArray<CPDF_StreamAcc> m_Data; 34 CFX_ObjectArray<CPDF_StreamAcc> m_Data;
36 }; 35 };
37 36
38 class CXFA_FFApp : public IFWL_AdapterNative { 37 class CXFA_FFApp : public IFWL_AdapterNative {
39 public: 38 public:
40 CXFA_FFApp(IXFA_AppProvider* pProvider); 39 CXFA_FFApp(IXFA_AppProvider* pProvider);
41 ~CXFA_FFApp() override; 40 ~CXFA_FFApp() override;
42 41
43 CXFA_FFDocHandler* GetDocHandler(); 42 CXFA_FFDocHandler* GetDocHandler();
44 CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider, 43 CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider,
45 IFX_FileRead* pStream, 44 IFX_FileRead* pStream,
46 FX_BOOL bTakeOverFile); 45 FX_BOOL bTakeOverFile);
47 CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc); 46 CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc);
48 IXFA_AppProvider* GetAppProvider() { return m_pProvider; } 47 IXFA_AppProvider* GetAppProvider() { return m_pProvider; }
49 void SetDefaultFontMgr(CXFA_DefFontMgr* pFontMgr); 48 void SetDefaultFontMgr(CXFA_DefFontMgr* pFontMgr);
50 CXFA_FFMenuHandler* GetMenuHandler();
51 49
52 // IFWL_AdapterNative: 50 // IFWL_AdapterNative:
53 IFWL_AdapterWidgetMgr* GetWidgetMgr( 51 IFWL_AdapterWidgetMgr* GetWidgetMgr(
54 IFWL_WidgetMgrDelegate* pDelegate) override; 52 IFWL_WidgetMgrDelegate* pDelegate) override;
55 IFWL_AdapterThreadMgr* GetThreadMgr() override; 53 IFWL_AdapterThreadMgr* GetThreadMgr() override;
56 IFWL_AdapterTimerMgr* GetTimerMgr() override; 54 IFWL_AdapterTimerMgr* GetTimerMgr() override;
57 55
58 CXFA_FontMgr* GetXFAFontMgr(); 56 CXFA_FontMgr* GetXFAFontMgr();
59 IFX_FontMgr* GetFDEFontMgr(); 57 IFX_FontMgr* GetFDEFontMgr();
60 CXFA_FWLTheme* GetFWLTheme(); 58 CXFA_FWLTheme* GetFWLTheme();
61 IFWL_WidgetMgrDelegate* GetWidgetMgrDelegate() { 59 IFWL_WidgetMgrDelegate* GetWidgetMgrDelegate() {
62 return m_pWidgetMgrDelegate; 60 return m_pWidgetMgrDelegate;
63 } 61 }
64 62
65 protected: 63 protected:
66 CXFA_FFDocHandler* m_pDocHandler; 64 CXFA_FFDocHandler* m_pDocHandler;
67 IFWL_App* m_pFWLApp; 65 IFWL_App* m_pFWLApp;
68 CXFA_FWLTheme* m_pFWLTheme; 66 CXFA_FWLTheme* m_pFWLTheme;
69 IXFA_AppProvider* m_pProvider; 67 IXFA_AppProvider* m_pProvider;
70 CXFA_FontMgr* m_pFontMgr; 68 CXFA_FontMgr* m_pFontMgr;
71 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ 69 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
72 IFX_FontSourceEnum* m_pFontSource; 70 IFX_FontSourceEnum* m_pFontSource;
73 #endif 71 #endif
74 CXFA_FWLAdapterWidgetMgr* m_pAdapterWidgetMgr; 72 CXFA_FWLAdapterWidgetMgr* m_pAdapterWidgetMgr;
75 IFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate; 73 IFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate;
76 IFX_FontMgr* m_pFDEFontMgr; 74 IFX_FontMgr* m_pFDEFontMgr;
77 CXFA_FFMenuHandler* m_pMenuHandler;
78 CFWL_SDAdapterThreadMgr* m_pAdapterThreadMgr; 75 CFWL_SDAdapterThreadMgr* m_pAdapterThreadMgr;
79 }; 76 };
80 77
81 #endif // XFA_INCLUDE_FXFA_XFA_FFAPP_H_ 78 #endif // XFA_INCLUDE_FXFA_XFA_FFAPP_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_rendercontext.cpp ('k') | xfa/include/fxfa/xfa_ffdochandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698