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

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

Issue 2376153004: Move core/fpdfapi/include to core/fpdfapi (Closed)
Patch Set: Rebase to master Created 4 years, 2 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
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_
8 #define CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_
9
10 #include <memory>
11
12 #include "core/fxcrt/include/fx_basic.h"
13
14 class CCodec_FaxModule;
15 class CCodec_FlateModule;
16 class CCodec_IccModule;
17 class CCodec_Jbig2Module;
18 class CCodec_JpegModule;
19 class CCodec_JpxModule;
20 class CCodec_ModuleMgr;
21 class CPDF_PageModule;
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
34 class CPDF_ModuleMgr {
35 public:
36 static CPDF_ModuleMgr* Get();
37 static void Create();
38 static void Destroy();
39 static const int kFileBufSize = 512;
40
41 void SetCodecModule(CCodec_ModuleMgr* pModule) { m_pCodecModule = pModule; }
42 CCodec_ModuleMgr* GetCodecModule() { return m_pCodecModule; }
43
44 void InitPageModule();
45 CPDF_PageModule* GetPageModule() const { return m_pPageModule.get(); }
46
47 void SetUnsupportInfoAdapter(
48 std::unique_ptr<CFSDK_UnsupportInfo_Adapter> pAdapter) {
49 m_pUnsupportInfoAdapter = std::move(pAdapter);
50 }
51 CFSDK_UnsupportInfo_Adapter* GetUnsupportInfoAdapter() const {
52 return m_pUnsupportInfoAdapter.get();
53 }
54
55 void LoadEmbeddedGB1CMaps();
56 void LoadEmbeddedCNS1CMaps();
57 void LoadEmbeddedJapan1CMaps();
58 void LoadEmbeddedKorea1CMaps();
59
60 CCodec_FaxModule* GetFaxModule();
61 CCodec_JpegModule* GetJpegModule();
62 CCodec_JpxModule* GetJpxModule();
63 CCodec_Jbig2Module* GetJbig2Module();
64 CCodec_IccModule* GetIccModule();
65 CCodec_FlateModule* GetFlateModule();
66
67 private:
68 CPDF_ModuleMgr();
69 ~CPDF_ModuleMgr();
70
71 CCodec_ModuleMgr* m_pCodecModule;
72 std::unique_ptr<CPDF_PageModule> m_pPageModule;
73 std::unique_ptr<CFSDK_UnsupportInfo_Adapter> m_pUnsupportInfoAdapter;
74 };
75
76 #endif // CORE_FPDFAPI_INCLUDE_CPDF_MODULEMGR_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp ('k') | core/fpdfapi/include/cpdf_pagerendercontext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698