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

Side by Side Diff: core/fpdfapi/include/cpdf_modulemgr.h

Issue 2180443002: Use actual type instead CFX_Deletable (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: one more fix Created 4 years, 5 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
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_ 7 #ifndef CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_
8 #define CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_ 8 #define CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "core/fxcrt/include/fx_basic.h" 12 #include "core/fxcrt/include/fx_basic.h"
13 13
14 class CCodec_FaxModule; 14 class CCodec_FaxModule;
15 class CCodec_FlateModule; 15 class CCodec_FlateModule;
16 class CCodec_IccModule; 16 class CCodec_IccModule;
17 class CCodec_Jbig2Module; 17 class CCodec_Jbig2Module;
18 class CCodec_JpegModule; 18 class CCodec_JpegModule;
19 class CCodec_JpxModule; 19 class CCodec_JpxModule;
20 class CCodec_ModuleMgr; 20 class CCodec_ModuleMgr;
21 class CPDF_PageModule; 21 class CPDF_PageModule;
22 22
23 class CFSDK_UnsupportInfo_Adapter {
24 public:
25 explicit CFSDK_UnsupportInfo_Adapter(void* unsp_info)
26 : m_unsp_info(unsp_info) {}
27
28 void* GetUnspInfo() const { return m_unsp_info; }
29
30 private:
31 void* const m_unsp_info;
32 };
33
23 class CPDF_ModuleMgr { 34 class CPDF_ModuleMgr {
24 public: 35 public:
25 static CPDF_ModuleMgr* Get(); 36 static CPDF_ModuleMgr* Get();
26 static void Create(); 37 static void Create();
27 static void Destroy(); 38 static void Destroy();
28 static const int kFileBufSize = 512; 39 static const int kFileBufSize = 512;
29 40
30 void SetCodecModule(CCodec_ModuleMgr* pModule) { m_pCodecModule = pModule; } 41 void SetCodecModule(CCodec_ModuleMgr* pModule) { m_pCodecModule = pModule; }
31 CCodec_ModuleMgr* GetCodecModule() { return m_pCodecModule; } 42 CCodec_ModuleMgr* GetCodecModule() { return m_pCodecModule; }
32 43
33 void InitPageModule(); 44 void InitPageModule();
34 CPDF_PageModule* GetPageModule() const { return m_pPageModule.get(); } 45 CPDF_PageModule* GetPageModule() const { return m_pPageModule.get(); }
35 46
36 void SetUnsupportInfoAdapter(std::unique_ptr<CFX_Deletable> pAdapter) { 47 void SetUnsupportInfoAdapter(
48 std::unique_ptr<CFSDK_UnsupportInfo_Adapter> pAdapter) {
37 m_pUnsupportInfoAdapter = std::move(pAdapter); 49 m_pUnsupportInfoAdapter = std::move(pAdapter);
38 } 50 }
39 CFX_Deletable* GetUnsupportInfoAdapter() const { 51 CFSDK_UnsupportInfo_Adapter* GetUnsupportInfoAdapter() const {
40 return m_pUnsupportInfoAdapter.get(); 52 return m_pUnsupportInfoAdapter.get();
41 } 53 }
42 54
43 void LoadEmbeddedGB1CMaps(); 55 void LoadEmbeddedGB1CMaps();
44 void LoadEmbeddedCNS1CMaps(); 56 void LoadEmbeddedCNS1CMaps();
45 void LoadEmbeddedJapan1CMaps(); 57 void LoadEmbeddedJapan1CMaps();
46 void LoadEmbeddedKorea1CMaps(); 58 void LoadEmbeddedKorea1CMaps();
47 59
48 CCodec_FaxModule* GetFaxModule(); 60 CCodec_FaxModule* GetFaxModule();
49 CCodec_JpegModule* GetJpegModule(); 61 CCodec_JpegModule* GetJpegModule();
50 CCodec_JpxModule* GetJpxModule(); 62 CCodec_JpxModule* GetJpxModule();
51 CCodec_Jbig2Module* GetJbig2Module(); 63 CCodec_Jbig2Module* GetJbig2Module();
52 CCodec_IccModule* GetIccModule(); 64 CCodec_IccModule* GetIccModule();
53 CCodec_FlateModule* GetFlateModule(); 65 CCodec_FlateModule* GetFlateModule();
54 66
55 private: 67 private:
56 CPDF_ModuleMgr(); 68 CPDF_ModuleMgr();
57 ~CPDF_ModuleMgr(); 69 ~CPDF_ModuleMgr();
58 70
59 CCodec_ModuleMgr* m_pCodecModule; 71 CCodec_ModuleMgr* m_pCodecModule;
60 std::unique_ptr<CPDF_PageModule> m_pPageModule; 72 std::unique_ptr<CPDF_PageModule> m_pPageModule;
61 std::unique_ptr<CFX_Deletable> m_pUnsupportInfoAdapter; 73 std::unique_ptr<CFSDK_UnsupportInfo_Adapter> m_pUnsupportInfoAdapter;
62 }; 74 };
63 75
64 #endif // CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_ 76 #endif // CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/include/cpdf_page.h ('k') | core/fpdfapi/include/cpdf_pagerendercontext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698