diff options
author | dsinclair <dsinclair@chromium.org> | 2016-05-04 14:24:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-04 14:24:53 -0700 |
commit | 55fa356c8ce72c597e75fc591fc67597b1c019d5 (patch) | |
tree | 14495a8fc3c21726c970069a696614d95bd11f6d /xfa/fwl/core/fwl_appimp.cpp | |
parent | b7675f63684ebff68c688a1c7b160596b6747c3e (diff) | |
download | pdfium-55fa356c8ce72c597e75fc591fc67597b1c019d5.tar.xz |
Cleanup IFWL_Adapter interfaces.
This CL removes:
* IFWL_AdapterNative
* IFWL_Adapter{Widget|Thread}Mgr
* IFWL_WidgetMgrDelegate
* CFWL_SDAdapter{Widget|Thread}Mgr
Methods which just returned have also been removed.
Review-Url: https://codereview.chromium.org/1928963004
Diffstat (limited to 'xfa/fwl/core/fwl_appimp.cpp')
-rw-r--r-- | xfa/fwl/core/fwl_appimp.cpp | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/xfa/fwl/core/fwl_appimp.cpp b/xfa/fwl/core/fwl_appimp.cpp index 0017aad8ad..ac00cca144 100644 --- a/xfa/fwl/core/fwl_appimp.cpp +++ b/xfa/fwl/core/fwl_appimp.cpp @@ -8,11 +8,11 @@ #include "xfa/fwl/core/fwl_noteimp.h" #include "xfa/fwl/core/fwl_widgetmgrimp.h" -#include "xfa/fwl/core/ifwl_adapterwidgetmgr.h" #include "xfa/fwl/core/ifwl_app.h" #include "xfa/fwl/core/ifwl_widget.h" +#include "xfa/fxfa/app/xfa_fwladapter.h" -IFWL_App* IFWL_App::Create(IFWL_AdapterNative* pAdapter) { +IFWL_App* IFWL_App::Create(CXFA_FFApp* pAdapter) { IFWL_App* pApp = new IFWL_App; pApp->SetImpl(new CFWL_AppImp(pApp, pAdapter)); return pApp; @@ -28,7 +28,7 @@ FWL_ERR IFWL_App::Finalize() { return static_cast<CFWL_AppImp*>(GetImpl())->Finalize(); } -IFWL_AdapterNative* IFWL_App::GetAdapterNative() { +CXFA_FFApp* IFWL_App::GetAdapterNative() { return static_cast<CFWL_AppImp*>(GetImpl())->GetAdapterNative(); } @@ -40,19 +40,19 @@ IFWL_ThemeProvider* IFWL_App::GetThemeProvider() { return static_cast<CFWL_AppImp*>(GetImpl())->GetThemeProvider(); } -FWL_ERR IFWL_App::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { - return static_cast<CFWL_AppImp*>(GetImpl())->SetThemeProvider(pThemeProvider); +void IFWL_App::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { + static_cast<CFWL_AppImp*>(GetImpl())->SetThemeProvider(pThemeProvider); } -FWL_ERR IFWL_App::Exit(int32_t iExitCode) { - return static_cast<CFWL_AppImp*>(GetImpl())->Exit(iExitCode); +void IFWL_App::Exit(int32_t iExitCode) { + static_cast<CFWL_AppImp*>(GetImpl())->Exit(iExitCode); } CFWL_NoteDriver* IFWL_App::GetNoteDriver() const { return static_cast<CFWL_AppImp*>(GetImpl())->GetNoteDriver(); } -CFWL_AppImp::CFWL_AppImp(IFWL_App* pIface, IFWL_AdapterNative* pAdapter) +CFWL_AppImp::CFWL_AppImp(IFWL_App* pIface, CXFA_FFApp* pAdapter) : m_pAdapterNative(pAdapter), m_pThemeProvider(nullptr), m_pNoteDriver(new CFWL_NoteDriver), @@ -72,39 +72,42 @@ FWL_ERR CFWL_AppImp::Finalize() { m_pWidgetMgr.reset(); return FWL_ERR_Succeeded; } -IFWL_AdapterNative* CFWL_AppImp::GetAdapterNative() const { +CXFA_FFApp* CFWL_AppImp::GetAdapterNative() const { return m_pAdapterNative; } -IFWL_AdapterWidgetMgr* FWL_GetAdapterWidgetMgr() { +CXFA_FWLAdapterWidgetMgr* FWL_GetAdapterWidgetMgr() { return static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr()) ->GetAdapterWidgetMgr(); } IFWL_WidgetMgr* CFWL_AppImp::GetWidgetMgr() const { return m_pWidgetMgr.get(); } -FWL_ERR CFWL_AppImp::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { +void CFWL_AppImp::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) { m_pThemeProvider = pThemeProvider; - return FWL_ERR_Succeeded; } -FWL_ERR CFWL_AppImp::Exit(int32_t iExitCode) { + +void CFWL_AppImp::Exit(int32_t iExitCode) { while (m_pNoteDriver->PopNoteLoop()) { continue; } - return m_pWidgetMgr->GetAdapterWidgetMgr()->Exit(0); } + IFWL_ThemeProvider* CFWL_AppImp::GetThemeProvider() const { return m_pThemeProvider; } -IFWL_AdapterNative* FWL_GetAdapterNative() { + +CXFA_FFApp* FWL_GetAdapterNative() { IFWL_App* pApp = FWL_GetApp(); if (!pApp) return NULL; return pApp->GetAdapterNative(); } -static IFWL_App* _theApp = NULL; + +static IFWL_App* g_theApp = nullptr; IFWL_App* FWL_GetApp() { - return _theApp; + return g_theApp; } + void FWL_SetApp(IFWL_App* pApp) { - _theApp = pApp; + g_theApp = pApp; } |