summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_app.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-18 16:48:16 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-18 16:48:16 -0700
commit4e903136cf0f02578c0e47c6738b633c96814b62 (patch)
treef6c85bfe408c728b9b2dbfcaf60316912945643d /xfa/fwl/core/ifwl_app.h
parentf328d0d378b8df8a3416988d96c34f1d3f9d26d1 (diff)
downloadpdfium-4e903136cf0f02578c0e47c6738b633c96814b62.tar.xz
Merge IFWL_App and FWL_AppImp together
The IFWL_App class just acts as a proxy to the FWL_AppImp code. This Cl removes FWL_AppImp and merges the code back up to IFWL_App, simplifying the object hierarchy. Review-Url: https://codereview.chromium.org/2430563003
Diffstat (limited to 'xfa/fwl/core/ifwl_app.h')
-rw-r--r--xfa/fwl/core/ifwl_app.h38
1 files changed, 6 insertions, 32 deletions
diff --git a/xfa/fwl/core/ifwl_app.h b/xfa/fwl/core/ifwl_app.h
index c030e26b2e..35cbbe2ff9 100644
--- a/xfa/fwl/core/ifwl_app.h
+++ b/xfa/fwl/core/ifwl_app.h
@@ -7,25 +7,14 @@
#ifndef XFA_FWL_CORE_IFWL_APP_H_
#define XFA_FWL_CORE_IFWL_APP_H_
-// The FWL 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/fx_string.h"
-#include "xfa/fwl/core/fwl_appimp.h"
-#include "xfa/fwl/core/fwl_error.h"
class CFWL_NoteDriver;
class CFWL_WidgetMgr;
class CXFA_FFApp;
class CXFA_FWLAdapterWidgetMgr;
-class IFWL_ThemeProvider;
class IFWL_Widget;
enum FWL_KeyFlag {
@@ -40,32 +29,17 @@ enum FWL_KeyFlag {
class IFWL_App {
public:
- static IFWL_App* Create(CXFA_FFApp* pAdapter);
-
- virtual ~IFWL_App();
+ explicit IFWL_App(CXFA_FFApp* pAdapter);
+ ~IFWL_App();
- FWL_Error Initialize();
- FWL_Error Finalize();
CXFA_FFApp* GetAdapterNative();
CFWL_WidgetMgr* GetWidgetMgr();
- IFWL_ThemeProvider* GetThemeProvider();
- void SetThemeProvider(IFWL_ThemeProvider* pThemeProvider);
- void 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;
+ CFWL_NoteDriver* GetNoteDriver() const { return m_pNoteDriver.get(); }
private:
- IFWL_App();
-
- std::unique_ptr<CFWL_AppImp> m_pImpl;
+ CXFA_FFApp* const m_pAdapterNative;
+ std::unique_ptr<CFWL_WidgetMgr> m_pWidgetMgr;
+ std::unique_ptr<CFWL_NoteDriver> m_pNoteDriver;
};
IFWL_App* FWL_GetApp();