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

Unified Diff: xfa/fwl/core/fwl_appimp.cpp

Issue 1928963004: Cleanup IFWL_Adapter interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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
Index: xfa/fwl/core/fwl_appimp.cpp
diff --git a/xfa/fwl/core/fwl_appimp.cpp b/xfa/fwl/core/fwl_appimp.cpp
index 0017aad8ad459ace6bf2858f634da3fc76705632..1d19bd2b73bb27458124e39912c4b9b83bcb7d5d 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();
}
@@ -44,15 +44,15 @@ FWL_ERR IFWL_App::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
return 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,10 +72,10 @@ 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();
}
@@ -86,25 +86,29 @@ FWL_ERR 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;
Tom Sepez 2016/04/28 16:42:11 nit: how about g_theApp? nullpr.
dsinclair 2016/04/28 17:53:45 Done.
IFWL_App* FWL_GetApp() {
return _theApp;
}
+
void FWL_SetApp(IFWL_App* pApp) {
_theApp = pApp;
}

Powered by Google App Engine
This is Rietveld 408576698