Remove CFWL_WidgetProperties::m_pFWLThemeProvider.
The IFWL_ThemeProvider, as implemented by CXFA_FWLThemeProvider is
essentially a singleton living in the CXFA_FFApp. Instead of storing
a theoretically changing pointer to it inside each of the FWL widget's
properties, retrieve the one and only instance as needed. Then remove
code to set it into widgets, which mainly involved propagating the
values to sub-widgets to keep them in sync.
Change-Id: Ia645a338bdc600cb9199d439c09aabdbe959bfe8
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72750
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fxfa/cxfa_ffapp.h b/xfa/fxfa/cxfa_ffapp.h
index e3bac30..2c513fd 100644
--- a/xfa/fxfa/cxfa_ffapp.h
+++ b/xfa/fxfa/cxfa_ffapp.h
@@ -29,10 +29,11 @@
// CFWL_App::AdapterIface:
CFWL_WidgetMgr::AdapterIface* GetWidgetMgrAdapter() override;
TimerHandlerIface* GetTimerHandler() override;
+ IFWL_ThemeProvider* GetThemeProvider() override;
+ bool LoadFWLTheme(CXFA_FFDoc* doc);
CFWL_WidgetMgr* GetFWLWidgetMgr() const { return m_pFWLApp->GetWidgetMgr(); }
CFGAS_FontMgr* GetFDEFontMgr();
- CXFA_FWLTheme* GetFWLTheme(CXFA_FFDoc* doc);
IXFA_AppProvider* GetAppProvider() const { return m_pProvider.Get(); }
const CFWL_App* GetFWLApp() const { return m_pFWLApp.get(); }