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_PAGE_CPDF_PAGEMODULE_H_
8 #define CORE_FPDFAPI_PAGE_CPDF_PAGEMODULE_H_
9 
10 #include "core/fxcrt/retain_ptr.h"
11 
12 class CPDF_Document;
13 class CPDF_ColorSpace;
14 class CPDF_DeviceCS;
15 class CPDF_PatternCS;
16 
17 class CPDF_PageModule {
18  public:
19   // Per-process singleton managed by callers.
20   static void Create();
21   static void Destroy();
22   static CPDF_PageModule* GetInstance();
23 
24   RetainPtr<CPDF_ColorSpace> GetStockCS(int family);
25   void ClearStockFont(CPDF_Document* pDoc);
26 
27  private:
28   CPDF_PageModule();
29   ~CPDF_PageModule();
30 
31   RetainPtr<CPDF_DeviceCS> m_StockGrayCS;
32   RetainPtr<CPDF_DeviceCS> m_StockRGBCS;
33   RetainPtr<CPDF_DeviceCS> m_StockCMYKCS;
34   RetainPtr<CPDF_PatternCS> m_StockPatternCS;
35 };
36 
37 #endif  // CORE_FPDFAPI_PAGE_CPDF_PAGEMODULE_H_
38