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

Unified Diff: xfa/src/fwl/src/lightwidget/app.cpp

Issue 1502063005: Re-land "Rename CFWL_Thread classes to ThreadImp" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: unformat comment Created 5 years 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/src/fwl/src/core/include/fwl_widgetimp.h ('k') | xfa/src/fxfa/src/app/xfa_fwladapter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fwl/src/lightwidget/app.cpp
diff --git a/xfa/src/fwl/src/lightwidget/app.cpp b/xfa/src/fwl/src/lightwidget/app.cpp
index 3d49fab015dc1886b05e81a4dc158ffa571497dd..293a258f6bb34440026bba2f9b42883c79eb1806 100644
--- a/xfa/src/fwl/src/lightwidget/app.cpp
+++ b/xfa/src/fwl/src/lightwidget/app.cpp
@@ -5,31 +5,23 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../../foxitlib.h"
-CFWL_App::CFWL_App() : m_pAppImp(NULL), m_pThemeProvider(NULL) {
- m_pAppImp = IFWL_App::Create(NULL);
-}
+CFWL_App::CFWL_App() : m_pIface(IFWL_App::Create(nullptr)), m_pTheme(nullptr) {}
CFWL_App::~CFWL_App() {
- if (m_pThemeProvider) {
- m_pThemeProvider->Finalize();
- delete m_pThemeProvider;
- m_pThemeProvider = NULL;
+ if (m_pTheme) {
+ m_pTheme->Finalize();
+ delete m_pTheme;
+ m_pTheme = NULL;
}
- m_pAppImp->Release();
+ m_pIface->Release();
}
FWL_ERR CFWL_App::Initialize() {
- m_pThemeProvider = new CFWL_Theme;
- m_pThemeProvider->Initialize();
- m_pAppImp->SetThemeProvider((IFWL_ThemeProvider*)m_pThemeProvider);
- return m_pAppImp->Initialize();
-}
-CFWL_Theme* CFWL_App::GetTheme() {
- return m_pThemeProvider;
+ m_pTheme = new CFWL_Theme;
+ m_pTheme->Initialize();
+ m_pIface->SetThemeProvider(m_pTheme);
+ return m_pIface->Initialize();
}
FWL_ERR CFWL_App::Exit(int32_t iExitCode) {
- if (!m_pAppImp)
+ if (!m_pIface)
return FWL_ERR_Indefinite;
- return m_pAppImp->Exit(iExitCode);
-}
-IFWL_App* CFWL_App::GetApp() {
- return m_pAppImp;
+ return m_pIface->Exit(iExitCode);
}
« no previous file with comments | « xfa/src/fwl/src/core/include/fwl_widgetimp.h ('k') | xfa/src/fxfa/src/app/xfa_fwladapter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698