summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_formproxy.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-31 07:29:34 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-31 07:29:34 -0700
commit20855384b8149a631c3c1d229551523c12eb767b (patch)
treee3cef278e322742bea6c4b48f40ed580754ebd80 /xfa/fwl/core/ifwl_formproxy.cpp
parent747dcf775c5cb661e96a639f73322cc489d8590f (diff)
downloadpdfium-20855384b8149a631c3c1d229551523c12eb767b.tar.xz
Remove FWL globals.
This CL removes the FWL_GetApp, FWL_SetApp and FWL_GetWidgetAdapter methods. In the process it changes the various Initialize methods to return void. Review-Url: https://codereview.chromium.org/2436103002
Diffstat (limited to 'xfa/fwl/core/ifwl_formproxy.cpp')
-rw-r--r--xfa/fwl/core/ifwl_formproxy.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/xfa/fwl/core/ifwl_formproxy.cpp b/xfa/fwl/core/ifwl_formproxy.cpp
index 9a00bf3e8f..16cd90813d 100644
--- a/xfa/fwl/core/ifwl_formproxy.cpp
+++ b/xfa/fwl/core/ifwl_formproxy.cpp
@@ -8,12 +8,24 @@
#include "xfa/fwl/core/fwl_noteimp.h"
-IFWL_FormProxy::IFWL_FormProxy(const CFWL_WidgetImpProperties& properties,
+IFWL_FormProxy::IFWL_FormProxy(const IFWL_App* app,
+ const CFWL_WidgetImpProperties& properties,
IFWL_Widget* pOuter)
- : IFWL_Form(properties, pOuter) {}
+ : IFWL_Form(app, properties, pOuter) {}
IFWL_FormProxy::~IFWL_FormProxy() {}
+void IFWL_FormProxy::Initialize() {
+ IFWL_Widget::Initialize();
+ m_pDelegate = new CFWL_FormProxyImpDelegate(this);
+}
+
+void IFWL_FormProxy::Finalize() {
+ delete m_pDelegate;
+ m_pDelegate = nullptr;
+ IFWL_Widget::Finalize();
+}
+
FWL_Type IFWL_FormProxy::GetClassID() const {
return FWL_Type::FormProxy;
}
@@ -25,19 +37,6 @@ FX_BOOL IFWL_FormProxy::IsInstance(const CFX_WideStringC& wsClass) const {
return IFWL_Form::IsInstance(wsClass);
}
-FWL_Error IFWL_FormProxy::Initialize() {
- if (IFWL_Widget::Initialize() != FWL_Error::Succeeded)
- return FWL_Error::Indefinite;
- m_pDelegate = new CFWL_FormProxyImpDelegate(this);
- return FWL_Error::Succeeded;
-}
-
-void IFWL_FormProxy::Finalize() {
- delete m_pDelegate;
- m_pDelegate = nullptr;
- IFWL_Widget::Finalize();
-}
-
FWL_Error IFWL_FormProxy::Update() {
return FWL_Error::Succeeded;
}