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

Unified Diff: xfa/include/fwl/theme/widgettp.h

Issue 1672283002: Remove CFX_PtrArray from xfa/include/fwl (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/include/fwl/lightwidget/theme.h ('k') | xfa/src/fwl/src/lightwidget/listbox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/include/fwl/theme/widgettp.h
diff --git a/xfa/include/fwl/theme/widgettp.h b/xfa/include/fwl/theme/widgettp.h
index adeeb42d6c9b7afafcf1bb60f8b1c996113b112a..404ca51547299b4907dd9d958a1f463613c69af9 100644
--- a/xfa/include/fwl/theme/widgettp.h
+++ b/xfa/include/fwl/theme/widgettp.h
@@ -4,8 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef _FWL_WIDGETTP_H
-#define _FWL_WIDGETTP_H
+#ifndef XFA_INCLUDE_FWL_THEME_WIDGETTP_H_
+#define XFA_INCLUDE_FWL_THEME_WIDGETTP_H_
+
+#include <memory>
+#include <vector>
+
class IFWL_ThemeProvider;
class IFWL_Widget;
class IFDE_TextOut;
@@ -16,6 +20,7 @@ class IFX_FontSourceEnum;
#endif
class CFWL_WidgetTP;
class CFWL_ArrowData;
+
class CFWL_WidgetTP {
public:
virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget);
@@ -142,6 +147,7 @@ void FWLTHEME_Release();
FX_DWORD FWL_GetThemeLayout(FX_DWORD dwThemeID);
FX_DWORD FWL_GetThemeColor(FX_DWORD dwThemeID);
FX_DWORD FWL_MakeThemeID(FX_DWORD dwLayout, FX_DWORD dwColor);
+
class CFWL_ArrowData {
public:
static CFWL_ArrowData* GetInstance();
@@ -162,6 +168,7 @@ class CFWL_ArrowData {
CFWL_ArrowData();
static CFWL_ArrowData* m_pInstance;
};
+
class CFWL_FontData {
public:
CFWL_FontData();
@@ -184,16 +191,22 @@ class CFWL_FontData {
IFX_FontSourceEnum* m_pFontSource;
#endif
};
+
class CFWL_FontManager {
public:
- CFWL_FontManager();
- virtual ~CFWL_FontManager();
+ static CFWL_FontManager* GetInstance();
+ static void DestroyInstance();
+
IFX_Font* FindFont(const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
FX_WORD dwCodePage);
protected:
- CFX_PtrArray m_arrFonts;
+ CFWL_FontManager();
+ virtual ~CFWL_FontManager();
+
+ static CFWL_FontManager* s_FontManager;
+ std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray;
};
-CFWL_FontManager* FWL_GetFontManager();
-#endif
+
+#endif // XFA_INCLUDE_FWL_THEME_WIDGETTP_H_
« no previous file with comments | « xfa/include/fwl/lightwidget/theme.h ('k') | xfa/src/fwl/src/lightwidget/listbox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698