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 #include "core/fpdfapi/cpdf_modulemgr.h" | 7 #include "core/fpdfapi/cpdf_modulemgr.h" |
8 | 8 |
9 #include "core/fpdfapi/page/cpdf_pagemodule.h" | 9 #include "core/fpdfapi/page/cpdf_pagemodule.h" |
10 #include "core/fxcodec/fx_codec.h" | 10 #include "core/fxcodec/fx_codec.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 // static | 25 // static |
26 void CPDF_ModuleMgr::Destroy() { | 26 void CPDF_ModuleMgr::Destroy() { |
27 delete g_pDefaultMgr; | 27 delete g_pDefaultMgr; |
28 g_pDefaultMgr = nullptr; | 28 g_pDefaultMgr = nullptr; |
29 } | 29 } |
30 | 30 |
31 CPDF_ModuleMgr::CPDF_ModuleMgr() : m_pCodecModule(nullptr) {} | 31 CPDF_ModuleMgr::CPDF_ModuleMgr() : m_pCodecModule(nullptr) {} |
32 | 32 |
33 CPDF_ModuleMgr::~CPDF_ModuleMgr() {} | 33 CPDF_ModuleMgr::~CPDF_ModuleMgr() {} |
34 | 34 |
| 35 void CPDF_ModuleMgr::InitPageModule() { |
| 36 m_pPageModule.reset(new CPDF_PageModule); |
| 37 } |
| 38 |
35 CCodec_FaxModule* CPDF_ModuleMgr::GetFaxModule() { | 39 CCodec_FaxModule* CPDF_ModuleMgr::GetFaxModule() { |
36 return m_pCodecModule ? m_pCodecModule->GetFaxModule() : nullptr; | 40 return m_pCodecModule ? m_pCodecModule->GetFaxModule() : nullptr; |
37 } | 41 } |
38 | 42 |
39 CCodec_JpegModule* CPDF_ModuleMgr::GetJpegModule() { | 43 CCodec_JpegModule* CPDF_ModuleMgr::GetJpegModule() { |
40 return m_pCodecModule ? m_pCodecModule->GetJpegModule() : nullptr; | 44 return m_pCodecModule ? m_pCodecModule->GetJpegModule() : nullptr; |
41 } | 45 } |
42 | 46 |
43 CCodec_JpxModule* CPDF_ModuleMgr::GetJpxModule() { | 47 CCodec_JpxModule* CPDF_ModuleMgr::GetJpxModule() { |
44 return m_pCodecModule ? m_pCodecModule->GetJpxModule() : nullptr; | 48 return m_pCodecModule ? m_pCodecModule->GetJpxModule() : nullptr; |
45 } | 49 } |
46 | 50 |
47 CCodec_Jbig2Module* CPDF_ModuleMgr::GetJbig2Module() { | 51 CCodec_Jbig2Module* CPDF_ModuleMgr::GetJbig2Module() { |
48 return m_pCodecModule ? m_pCodecModule->GetJbig2Module() : nullptr; | 52 return m_pCodecModule ? m_pCodecModule->GetJbig2Module() : nullptr; |
49 } | 53 } |
50 | 54 |
51 CCodec_IccModule* CPDF_ModuleMgr::GetIccModule() { | 55 CCodec_IccModule* CPDF_ModuleMgr::GetIccModule() { |
52 return m_pCodecModule ? m_pCodecModule->GetIccModule() : nullptr; | 56 return m_pCodecModule ? m_pCodecModule->GetIccModule() : nullptr; |
53 } | 57 } |
54 | 58 |
55 CCodec_FlateModule* CPDF_ModuleMgr::GetFlateModule() { | 59 CCodec_FlateModule* CPDF_ModuleMgr::GetFlateModule() { |
56 return m_pCodecModule ? m_pCodecModule->GetFlateModule() : nullptr; | 60 return m_pCodecModule ? m_pCodecModule->GetFlateModule() : nullptr; |
57 } | 61 } |
OLD | NEW |