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

Unified Diff: xfa/fwl/core/ifwl_app.h

Issue 1921853006: More FWL interface cleanup. (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
« no previous file with comments | « xfa/fwl/core/ifwl_adapterthreadmgr.h ('k') | xfa/fwl/core/ifwl_notedriver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_app.h
diff --git a/xfa/fwl/core/ifwl_app.h b/xfa/fwl/core/ifwl_app.h
index 3fb0940ed42cab6c635b3cd2890ced12b46ba9f6..53dc35d33ab9f386d0a358506579416874445af0 100644
--- a/xfa/fwl/core/ifwl_app.h
+++ b/xfa/fwl/core/ifwl_app.h
@@ -7,19 +7,33 @@
#ifndef XFA_FWL_CORE_IFWL_APP_H_
#define XFA_FWL_CORE_IFWL_APP_H_
+// The FWL thread/app code contains three parallel classes, which reference each
+// other via pointers as follows:
+//
+// m_pIface m_pImpl
+// CXFA_FFApp ------------> IFWL_App -----------> CFWL_AppImp
+// <-----------
+// m_pIface
+
+#include <memory>
+
#include "core/fxcrt/include/fx_string.h"
-#include "xfa/fwl/core/ifwl_thread.h"
+#include "xfa/fwl/core/fwl_appimp.h"
+#include "xfa/fwl/core/fwl_error.h"
+class CFWL_NoteDriver;
class IFWL_AdapterNative;
+class IFWL_AdapterWidgetMgr;
+class IFWL_ThemeProvider;
class IFWL_Widget;
class IFWL_WidgetMgr;
-class IFWL_ThemeProvider;
-class IFWL_AdapterWidgetMgr;
-class IFWL_App : public IFWL_Thread {
+class IFWL_App {
public:
static IFWL_App* Create(IFWL_AdapterNative* pAdapter);
+ virtual ~IFWL_App() {}
+
FWL_ERR Initialize();
FWL_ERR Finalize();
IFWL_AdapterNative* GetAdapterNative();
@@ -28,8 +42,20 @@ class IFWL_App : public IFWL_Thread {
FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
FWL_ERR Exit(int32_t iExitCode);
+ // These call into polymorphic methods in the impl; no need to override.
+ void Release();
+
+ CFWL_AppImp* GetImpl() const { return m_pImpl.get(); }
+
+ // Takes ownership of |pImpl|.
+ void SetImpl(CFWL_AppImp* pImpl) { m_pImpl.reset(pImpl); }
+
+ CFWL_NoteDriver* GetNoteDriver() const;
+
private:
IFWL_App() {}
+
+ std::unique_ptr<CFWL_AppImp> m_pImpl;
};
IFWL_App* FWL_GetApp();
« no previous file with comments | « xfa/fwl/core/ifwl_adapterthreadmgr.h ('k') | xfa/fwl/core/ifwl_notedriver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698