diff options
author | dsinclair <dsinclair@chromium.org> | 2016-05-04 17:57:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-04 17:57:03 -0700 |
commit | c777f486f84611d2fdd2d03af661b14955f9efb6 (patch) | |
tree | 679012454d82e885f749d17f75fd12735efec29a /xfa/fwl/basewidget/fwl_formproxyimp.cpp | |
parent | 41aad19ba366540bd4efa20a9009ac1c70a81403 (diff) | |
download | pdfium-c777f486f84611d2fdd2d03af661b14955f9efb6.tar.xz |
Convert FWL_ERR into an enum class.
This Cl updates FWL_ERR to be an FWL_Error enum class. It removes FX_ERR and
replaces it with FWL_Error as well as the values were the same.
There were many places where we either returned other values for FWL_ERR
results.
This Cl is the same as: https://codereview.chromium.org/1943413002/ but I seem
to have messed up the base URL in that one.
TBR=tsepez@chromium.org
Review-Url: https://codereview.chromium.org/1952693003
Diffstat (limited to 'xfa/fwl/basewidget/fwl_formproxyimp.cpp')
-rw-r--r-- | xfa/fwl/basewidget/fwl_formproxyimp.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/xfa/fwl/basewidget/fwl_formproxyimp.cpp b/xfa/fwl/basewidget/fwl_formproxyimp.cpp index 0a5bb67aec..1e70da64ad 100644 --- a/xfa/fwl/basewidget/fwl_formproxyimp.cpp +++ b/xfa/fwl/basewidget/fwl_formproxyimp.cpp @@ -14,9 +14,9 @@ CFWL_FormProxyImp::CFWL_FormProxyImp(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter) : CFWL_FormImp(properties, pOuter) {} CFWL_FormProxyImp::~CFWL_FormProxyImp() {} -FWL_ERR CFWL_FormProxyImp::GetClassName(CFX_WideString& wsClass) const { +FWL_Error CFWL_FormProxyImp::GetClassName(CFX_WideString& wsClass) const { wsClass = FWL_CLASS_FormProxy; - return FWL_ERR_Succeeded; + return FWL_Error::Succeeded; } uint32_t CFWL_FormProxyImp::GetClassID() const { return FWL_CLASSHASH_FormProxy; @@ -27,27 +27,29 @@ FX_BOOL CFWL_FormProxyImp::IsInstance(const CFX_WideStringC& wsClass) const { } return CFWL_FormImp::IsInstance(wsClass); } -FWL_ERR CFWL_FormProxyImp::Initialize() { - if (CFWL_WidgetImp::Initialize() != FWL_ERR_Succeeded) - return FWL_ERR_Indefinite; +FWL_Error CFWL_FormProxyImp::Initialize() { + if (CFWL_WidgetImp::Initialize() != FWL_Error::Succeeded) + return FWL_Error::Indefinite; m_pDelegate = new CFWL_FormProxyImpDelegate(this); - return FWL_ERR_Succeeded; + return FWL_Error::Succeeded; } -FWL_ERR CFWL_FormProxyImp::Finalize() { +FWL_Error CFWL_FormProxyImp::Finalize() { delete m_pDelegate; m_pDelegate = nullptr; return CFWL_WidgetImp::Finalize(); } -FWL_ERR CFWL_FormProxyImp::Update() { - return FWL_ERR_Succeeded; +FWL_Error CFWL_FormProxyImp::Update() { + return FWL_Error::Succeeded; } -FWL_ERR CFWL_FormProxyImp::DrawWidget(CFX_Graphics* pGraphics, - const CFX_Matrix* pMatrix) { - return FWL_ERR_Succeeded; +FWL_Error CFWL_FormProxyImp::DrawWidget(CFX_Graphics* pGraphics, + const CFX_Matrix* pMatrix) { + return FWL_Error::Succeeded; } + CFWL_FormProxyImpDelegate::CFWL_FormProxyImpDelegate(CFWL_FormProxyImp* pOwner) : m_pOwner(pOwner) {} -int32_t CFWL_FormProxyImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { + +void CFWL_FormProxyImpDelegate::OnProcessMessage(CFWL_Message* pMessage) { IFWL_WidgetDelegate* pDelegate = m_pOwner->m_pOuter->SetDelegate(NULL); - return pDelegate->OnProcessMessage(pMessage); + pDelegate->OnProcessMessage(pMessage); } |