summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_wnd.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-09-15 15:32:01 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-09-15 22:42:04 +0000
commit134ac9105586407eb3b1e06001101ff893dd4a31 (patch)
tree42742a4d7867643a9e30d637204bc320407a66c0 /fpdfsdk/pwl/cpwl_wnd.cpp
parentbf15730b2c9577d4efd2124d84c6c8ccc5f66b43 (diff)
downloadpdfium-134ac9105586407eb3b1e06001101ff893dd4a31.tar.xz
Introduce CPWL_Wnd::PrivateData class.
First step in passing ownership of this memory to the CPWL_Wnd. In turn, nest two other classes that also require PrivateData to satisfy nesting rules. Move one stray #define to the appropriate file while at it. Change-Id: I565934565421f5843a3b792b3bdc21b5e8839eb8 Reviewed-on: https://pdfium-review.googlesource.com/14170 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/pwl/cpwl_wnd.cpp')
-rw-r--r--fpdfsdk/pwl/cpwl_wnd.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/fpdfsdk/pwl/cpwl_wnd.cpp b/fpdfsdk/pwl/cpwl_wnd.cpp
index e259d1f9ef..401fed3f9c 100644
--- a/fpdfsdk/pwl/cpwl_wnd.cpp
+++ b/fpdfsdk/pwl/cpwl_wnd.cpp
@@ -44,6 +44,8 @@ CPWL_Wnd::CreateParams::CreateParams()
CPWL_Wnd::CreateParams::CreateParams(const CreateParams& other) = default;
+CPWL_Wnd::CreateParams::~CreateParams() = default;
+
class CPWL_MsgControl : public CFX_Observable<CPWL_MsgControl> {
friend class CPWL_Wnd;
@@ -181,12 +183,12 @@ void CPWL_Wnd::OnCreated() {}
void CPWL_Wnd::OnDestroy() {}
-void CPWL_Wnd::InvalidateFocusHandler(IPWL_FocusHandler* handler) {
+void CPWL_Wnd::InvalidateFocusHandler(FocusHandlerIface* handler) {
if (m_CreationParams.pFocusHandler == handler)
m_CreationParams.pFocusHandler = nullptr;
}
-void CPWL_Wnd::InvalidateProvider(IPWL_Provider* provider) {
+void CPWL_Wnd::InvalidateProvider(ProviderIface* provider) {
if (m_CreationParams.pProvider.Get() == provider)
m_CreationParams.pProvider.Reset();
}
@@ -482,8 +484,8 @@ const CPWL_Dash& CPWL_Wnd::GetBorderDash() const {
return m_CreationParams.sDash;
}
-void* CPWL_Wnd::GetAttachedData() const {
- return m_CreationParams.pAttachedData;
+CPWL_Wnd::PrivateData* CPWL_Wnd::GetAttachedData() const {
+ return m_CreationParams.pAttachedData.Get();
}
CPWL_ScrollBar* CPWL_Wnd::GetVScrollBar() const {
@@ -670,11 +672,11 @@ CFX_SystemHandler* CPWL_Wnd::GetSystemHandler() const {
return m_CreationParams.pSystemHandler;
}
-IPWL_FocusHandler* CPWL_Wnd::GetFocusHandler() const {
- return m_CreationParams.pFocusHandler;
+CPWL_Wnd::FocusHandlerIface* CPWL_Wnd::GetFocusHandler() const {
+ return m_CreationParams.pFocusHandler.Get();
}
-IPWL_Provider* CPWL_Wnd::GetProvider() const {
+CPWL_Wnd::ProviderIface* CPWL_Wnd::GetProvider() const {
return m_CreationParams.pProvider.Get();
}
@@ -718,7 +720,7 @@ void CPWL_Wnd::SetTransparency(int32_t nTransparency) {
CFX_Matrix CPWL_Wnd::GetWindowMatrix() const {
CFX_Matrix mt = GetChildToRoot();
- if (IPWL_Provider* pProvider = GetProvider())
+ if (ProviderIface* pProvider = GetProvider())
mt.Concat(pProvider->GetWindowMatrix(GetAttachedData()));
return mt;
}