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

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: style fix Created 4 years, 4 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 struct _UNSUPPORT_INFO;
23
24 class CFSDK_UnsupportInfo_Adapter {
25 public:
26 explicit CFSDK_UnsupportInfo_Adapter(struct _UNSUPPORT_INFO* unsp_info)
Lei Zhang 2016/07/22 22:49:16 Just use a void* ? We are not suppose to know abou
Wei Li 2016/07/23 03:01:13 Done.
27 : m_unsp_info(unsp_info) {}
28
29 void ReportError(int nErrorType);
30
31 private:
32 struct _UNSUPPORT_INFO* const m_unsp_info;
33 };
22 34
23 class CPDF_ModuleMgr { 35 class CPDF_ModuleMgr {
24 public: 36 public:
25 static CPDF_ModuleMgr* Get(); 37 static CPDF_ModuleMgr* Get();
26 static void Create(); 38 static void Create();
27 static void Destroy(); 39 static void Destroy();
28 static const int kFileBufSize = 512; 40 static const int kFileBufSize = 512;
29 41
30 void SetCodecModule(CCodec_ModuleMgr* pModule) { m_pCodecModule = pModule; } 42 void SetCodecModule(CCodec_ModuleMgr* pModule) { m_pCodecModule = pModule; }
31 CCodec_ModuleMgr* GetCodecModule() { return m_pCodecModule; } 43 CCodec_ModuleMgr* GetCodecModule() { return m_pCodecModule; }
32 44
33 void InitPageModule(); 45 void InitPageModule();
34 CPDF_PageModule* GetPageModule() const { return m_pPageModule.get(); } 46 CPDF_PageModule* GetPageModule() const { return m_pPageModule.get(); }
35 47
36 void SetUnsupportInfoAdapter(std::unique_ptr<CFX_Deletable> pAdapter) { 48 void SetUnsupportInfoAdapter(
49 std::unique_ptr<CFSDK_UnsupportInfo_Adapter> pAdapter) {
37 m_pUnsupportInfoAdapter = std::move(pAdapter); 50 m_pUnsupportInfoAdapter = std::move(pAdapter);
38 } 51 }
39 CFX_Deletable* GetUnsupportInfoAdapter() const { 52 CFSDK_UnsupportInfo_Adapter* GetUnsupportInfoAdapter() const {
40 return m_pUnsupportInfoAdapter.get(); 53 return m_pUnsupportInfoAdapter.get();
41 } 54 }
42 55
43 void LoadEmbeddedGB1CMaps(); 56 void LoadEmbeddedGB1CMaps();
44 void LoadEmbeddedCNS1CMaps(); 57 void LoadEmbeddedCNS1CMaps();
45 void LoadEmbeddedJapan1CMaps(); 58 void LoadEmbeddedJapan1CMaps();
46 void LoadEmbeddedKorea1CMaps(); 59 void LoadEmbeddedKorea1CMaps();
47 60
48 CCodec_FaxModule* GetFaxModule(); 61 CCodec_FaxModule* GetFaxModule();
49 CCodec_JpegModule* GetJpegModule(); 62 CCodec_JpegModule* GetJpegModule();
50 CCodec_JpxModule* GetJpxModule(); 63 CCodec_JpxModule* GetJpxModule();
51 CCodec_Jbig2Module* GetJbig2Module(); 64 CCodec_Jbig2Module* GetJbig2Module();
52 CCodec_IccModule* GetIccModule(); 65 CCodec_IccModule* GetIccModule();
53 CCodec_FlateModule* GetFlateModule(); 66 CCodec_FlateModule* GetFlateModule();
54 67
55 private: 68 private:
56 CPDF_ModuleMgr(); 69 CPDF_ModuleMgr();
57 ~CPDF_ModuleMgr(); 70 ~CPDF_ModuleMgr();
58 71
59 CCodec_ModuleMgr* m_pCodecModule; 72 CCodec_ModuleMgr* m_pCodecModule;
60 std::unique_ptr<CPDF_PageModule> m_pPageModule; 73 std::unique_ptr<CPDF_PageModule> m_pPageModule;
61 std::unique_ptr<CFX_Deletable> m_pUnsupportInfoAdapter; 74 std::unique_ptr<CFSDK_UnsupportInfo_Adapter> m_pUnsupportInfoAdapter;
62 }; 75 };
63 76
64 #endif // CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_ 77 #endif // CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698