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

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: Rebase to master Created 4 years, 7 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/fwl/core/fwl_appimp.h ('k') | xfa/fwl/core/fwl_formimp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ac00cca14428ee3cf83c5e08212f8e5346f1f453 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;
}
« no previous file with comments | « xfa/fwl/core/fwl_appimp.h ('k') | xfa/fwl/core/fwl_formimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698