| 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 CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_ | 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_ |
| 8 #define CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_ | 8 #define CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_ |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #include "core/include/fxcrt/fx_coordinates.h" | 12 #include "core/include/fxcrt/fx_coordinates.h" |
| 11 #include "core/include/fxcrt/fx_system.h" | 13 #include "core/include/fxcrt/fx_system.h" |
| 12 #include "third_party/base/nonstd_unique_ptr.h" | |
| 13 | 14 |
| 14 class CCodec_ModuleMgr; | 15 class CCodec_ModuleMgr; |
| 15 class CFX_BitmapDevice; | 16 class CFX_BitmapDevice; |
| 16 class CFX_DIBSource; | 17 class CFX_DIBSource; |
| 17 class CFX_Matrix; | 18 class CFX_Matrix; |
| 18 class CPDF_ColorSpace; | 19 class CPDF_ColorSpace; |
| 19 class CPDF_Dictionary; | 20 class CPDF_Dictionary; |
| 20 class CPDF_DocPageData; | 21 class CPDF_DocPageData; |
| 21 class CPDF_DocRenderData; | 22 class CPDF_DocRenderData; |
| 22 class CPDF_Document; | 23 class CPDF_Document; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 void* pData, | 72 void* pData, |
| 72 PD_CALLBACK_FREEDATA callback); | 73 PD_CALLBACK_FREEDATA callback); |
| 73 | 74 |
| 74 void* GetPrivateData(void* module_id); | 75 void* GetPrivateData(void* module_id); |
| 75 | 76 |
| 76 private: | 77 private: |
| 77 CPDF_ModuleMgr(); | 78 CPDF_ModuleMgr(); |
| 78 ~CPDF_ModuleMgr(); | 79 ~CPDF_ModuleMgr(); |
| 79 | 80 |
| 80 CCodec_ModuleMgr* m_pCodecModule; | 81 CCodec_ModuleMgr* m_pCodecModule; |
| 81 nonstd::unique_ptr<IPDF_RenderModule> m_pRenderModule; | 82 std::unique_ptr<IPDF_RenderModule> m_pRenderModule; |
| 82 nonstd::unique_ptr<IPDF_PageModule> m_pPageModule; | 83 std::unique_ptr<IPDF_PageModule> m_pPageModule; |
| 83 FX_BOOL (*m_pDownloadCallback)(const FX_CHAR* module_name); | 84 FX_BOOL (*m_pDownloadCallback)(const FX_CHAR* module_name); |
| 84 CFX_PrivateData m_privateData; | 85 CFX_PrivateData m_privateData; |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 class IPDF_PageModule { | 88 class IPDF_PageModule { |
| 88 public: | 89 public: |
| 89 virtual ~IPDF_PageModule() {} | 90 virtual ~IPDF_PageModule() {} |
| 90 | 91 |
| 91 virtual CPDF_DocPageData* CreateDocData(CPDF_Document* pDoc) = 0; | 92 virtual CPDF_DocPageData* CreateDocData(CPDF_Document* pDoc) = 0; |
| 92 virtual void ReleaseDoc(CPDF_Document*) = 0; | 93 virtual void ReleaseDoc(CPDF_Document*) = 0; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 104 virtual CPDF_DocRenderData* CreateDocData(CPDF_Document* pDoc) = 0; | 105 virtual CPDF_DocRenderData* CreateDocData(CPDF_Document* pDoc) = 0; |
| 105 virtual void DestroyDocData(CPDF_DocRenderData*) = 0; | 106 virtual void DestroyDocData(CPDF_DocRenderData*) = 0; |
| 106 virtual void ClearDocData(CPDF_DocRenderData*) = 0; | 107 virtual void ClearDocData(CPDF_DocRenderData*) = 0; |
| 107 virtual CPDF_DocRenderData* GetRenderData() = 0; | 108 virtual CPDF_DocRenderData* GetRenderData() = 0; |
| 108 virtual CPDF_PageRenderCache* CreatePageCache(CPDF_Page* pPage) = 0; | 109 virtual CPDF_PageRenderCache* CreatePageCache(CPDF_Page* pPage) = 0; |
| 109 virtual void DestroyPageCache(CPDF_PageRenderCache*) = 0; | 110 virtual void DestroyPageCache(CPDF_PageRenderCache*) = 0; |
| 110 virtual CPDF_RenderConfig* GetConfig() = 0; | 111 virtual CPDF_RenderConfig* GetConfig() = 0; |
| 111 }; | 112 }; |
| 112 | 113 |
| 113 #endif // CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_ | 114 #endif // CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_ |
| OLD | NEW |