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

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

Issue 2430563003: Merge IFWL_App and FWL_AppImp together (Closed)
Patch Set: Cleanup Created 4 years, 2 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/ifwl_app.h
diff --git a/xfa/fwl/core/ifwl_app.h b/xfa/fwl/core/ifwl_app.h
index c030e26b2e0492cd87866481b1aeef32d8c7b162..35cbbe2ff97179ba8b78a86413933006d3e177b0 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
-// <-----------
npm 2016/10/18 17:04:11 Do we still need a comment explaining how these cl
dsinclair 2016/10/18 17:08:27 I don't think so, now it's just CXFA_FFApp -> IFWL
-// 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 {
Lei Zhang 2016/10/18 16:48:15 Is this going to get renamed later?
dsinclair 2016/10/18 17:00:22 Probably, I'm saving that for once we've got the r
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);
npm 2016/10/18 17:04:11 So these three methods were simply unused?
dsinclair 2016/10/18 17:08:26 GetThemeProvider was used but it always returned n
-
- // 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();

Powered by Google App Engine
This is Rietveld 408576698