summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_picturebox.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-02 14:51:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 14:51:25 -0700
commit3b3ce1a242f8445848d3f23d6c35ba01d7c645f4 (patch)
tree365d9ee7f8eec1103fb9fce0986e23d9f548ecae /xfa/fwl/core/ifwl_picturebox.cpp
parent4cf551577856f89103e162edc761def44ffb96fc (diff)
downloadpdfium-3b3ce1a242f8445848d3f23d6c35ba01d7c645f4.tar.xz
Merge delegates into IFWL_* classes.
This Cl removes ownership of the delgates from IFWL_Widget and puts it in the hand of the creating classes. In doing so, merge the delegates back into the IFWL_* classes to simplify logic. Review-Url: https://codereview.chromium.org/2467993003
Diffstat (limited to 'xfa/fwl/core/ifwl_picturebox.cpp')
-rw-r--r--xfa/fwl/core/ifwl_picturebox.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/xfa/fwl/core/ifwl_picturebox.cpp b/xfa/fwl/core/ifwl_picturebox.cpp
index 50bf2a40ea..6ab792c985 100644
--- a/xfa/fwl/core/ifwl_picturebox.cpp
+++ b/xfa/fwl/core/ifwl_picturebox.cpp
@@ -19,8 +19,6 @@ IFWL_PictureBox::IFWL_PictureBox(const IFWL_App* app,
m_rtClient.Reset();
m_rtImage.Reset();
m_matrix.SetIdentity();
-
- SetDelegate(pdfium::MakeUnique<CFWL_PictureBoxImpDelegate>(this));
}
IFWL_PictureBox::~IFWL_PictureBox() {}
@@ -119,10 +117,7 @@ bool IFWL_PictureBox::VStyle(uint32_t dwStyle) {
return false;
}
-CFWL_PictureBoxImpDelegate::CFWL_PictureBoxImpDelegate(IFWL_PictureBox* pOwner)
- : m_pOwner(pOwner) {}
-
-void CFWL_PictureBoxImpDelegate::OnDrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
- m_pOwner->DrawWidget(pGraphics, pMatrix);
+void IFWL_PictureBox::OnDrawWidget(CFX_Graphics* pGraphics,
+ const CFX_Matrix* pMatrix) {
+ DrawWidget(pGraphics, pMatrix);
}