| OLD | NEW | 
|   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> | 
 |  11  | 
|  10 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" |  12 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" | 
|  11 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" |  13 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" | 
|  12 #include "xfa/fgas/font/fgas_font.h" |  14 #include "xfa/fgas/font/fgas_font.h" | 
|  13 #include "xfa/fwl/core/ifwl_app.h" |  15 #include "xfa/fwl/core/ifwl_app.h" | 
|  14 #include "xfa/fxfa/include/fxfa.h" |  16 #include "xfa/fxfa/include/fxfa.h" | 
|  15  |  17  | 
|  16 class CFWL_WidgetMgrDelegate; |  18 class CFWL_WidgetMgrDelegate; | 
|  17 class CXFA_DefFontMgr; |  19 class CXFA_DefFontMgr; | 
|  18 class CXFA_FWLAdapterWidgetMgr; |  20 class CXFA_FWLAdapterWidgetMgr; | 
|  19 class CXFA_FWLTheme; |  21 class CXFA_FWLTheme; | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
|  33  |  35  | 
|  34  protected: |  36  protected: | 
|  35   CFX_ObjectArray<CPDF_StreamAcc> m_Data; |  37   CFX_ObjectArray<CPDF_StreamAcc> m_Data; | 
|  36 }; |  38 }; | 
|  37  |  39  | 
|  38 class CXFA_FFApp { |  40 class CXFA_FFApp { | 
|  39  public: |  41  public: | 
|  40   explicit CXFA_FFApp(IXFA_AppProvider* pProvider); |  42   explicit CXFA_FFApp(IXFA_AppProvider* pProvider); | 
|  41   ~CXFA_FFApp(); |  43   ~CXFA_FFApp(); | 
|  42  |  44  | 
|  43   CXFA_FFDocHandler* GetDocHandler(); |  | 
|  44   CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider, |  45   CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider, | 
|  45                         IFX_FileRead* pStream, |  46                         IFX_FileRead* pStream, | 
|  46                         FX_BOOL bTakeOverFile); |  47                         FX_BOOL bTakeOverFile); | 
|  47   CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc); |  48   CXFA_FFDoc* CreateDoc(IXFA_DocProvider* pProvider, CPDF_Document* pPDFDoc); | 
|  48   IXFA_AppProvider* GetAppProvider() { return m_pProvider; } |  | 
|  49   void SetDefaultFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr); |  49   void SetDefaultFontMgr(std::unique_ptr<CXFA_DefFontMgr> pFontMgr); | 
|  50  |  50  | 
 |  51   CXFA_FFDocHandler* GetDocHandler(); | 
|  51   CXFA_FWLAdapterWidgetMgr* GetWidgetMgr(CFWL_WidgetMgrDelegate* pDelegate); |  52   CXFA_FWLAdapterWidgetMgr* GetWidgetMgr(CFWL_WidgetMgrDelegate* pDelegate); | 
|  52   IFWL_AdapterTimerMgr* GetTimerMgr(); |  | 
|  53  |  | 
|  54   CXFA_FontMgr* GetXFAFontMgr(); |  | 
|  55   IFGAS_FontMgr* GetFDEFontMgr(); |  53   IFGAS_FontMgr* GetFDEFontMgr(); | 
|  56   CXFA_FWLTheme* GetFWLTheme(); |  54   CXFA_FWLTheme* GetFWLTheme(); | 
|  57   CFWL_WidgetMgrDelegate* GetWidgetMgrDelegate() { |  55  | 
 |  56   IXFA_AppProvider* GetAppProvider() const { return m_pProvider; } | 
 |  57   IFWL_AdapterTimerMgr* GetTimerMgr() const; | 
 |  58   CXFA_FontMgr* GetXFAFontMgr() const; | 
 |  59   CFWL_WidgetMgrDelegate* GetWidgetMgrDelegate() const { | 
|  58     return m_pWidgetMgrDelegate; |  60     return m_pWidgetMgrDelegate; | 
|  59   } |  61   } | 
|  60  |  62  | 
|  61  protected: |  63  protected: | 
|  62   CXFA_FFDocHandler* m_pDocHandler; |  64   std::unique_ptr<CXFA_FFDocHandler> m_pDocHandler; | 
|  63   IFWL_App* m_pFWLApp; |  65   IXFA_AppProvider* const m_pProvider; | 
|  64   CXFA_FWLTheme* m_pFWLTheme; |  66   std::unique_ptr<CXFA_FontMgr> m_pFontMgr; | 
|  65   IXFA_AppProvider* m_pProvider; |  | 
|  66   CXFA_FontMgr* m_pFontMgr; |  | 
|  67 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |  67 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 
|  68   CFX_FontSourceEnum_File* m_pFontSource; |  68   std::unique_ptr<CFX_FontSourceEnum_File> m_pFontSource; | 
|  69 #endif |  69 #endif | 
|  70   CXFA_FWLAdapterWidgetMgr* m_pAdapterWidgetMgr; |  70   std::unique_ptr<CXFA_FWLAdapterWidgetMgr> m_pAdapterWidgetMgr; | 
|  71   CFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate; |  71   CFWL_WidgetMgrDelegate* m_pWidgetMgrDelegate;  // not owned. | 
|  72   IFGAS_FontMgr* m_pFDEFontMgr; |  72   std::unique_ptr<IFGAS_FontMgr> m_pFDEFontMgr; | 
 |  73   // |m_pFWLApp| has to be released first, then |m_pFWLTheme| since the former | 
 |  74   // may refers to theme manager and the latter refers to font manager. | 
 |  75   std::unique_ptr<CXFA_FWLTheme> m_pFWLTheme; | 
 |  76   std::unique_ptr<IFWL_App> m_pFWLApp; | 
|  73 }; |  77 }; | 
|  74  |  78  | 
|  75 #endif  // XFA_FXFA_INCLUDE_XFA_FFAPP_H_ |  79 #endif  // XFA_FXFA_INCLUDE_XFA_FFAPP_H_ | 
| OLD | NEW |