diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-07-05 08:45:40 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-05 15:31:04 +0000 |
commit | e5e889eec8b362f5c65fc142660ad745a0d5cf21 (patch) | |
tree | 0308b7434f54b59d5a6811cd22e0120a501b15f5 | |
parent | d7403971a25c317671e92ccc676a5f600ed223eb (diff) | |
download | pdfium-e5e889eec8b362f5c65fc142660ad745a0d5cf21.tar.xz |
Remove PNM_{ADD|REMOVE}Child
This OnNotify message is only handled in CPWL_Wnd and it is only emited
in CPWL_Wnd. This CL inlines the resulting calls into the original
OnNotify callsites and removes the messages.
Change-Id: If419f0f51db00dbecc960d80bb10b17ad8bec7e1
Reviewed-on: https://pdfium-review.googlesource.com/7232
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_wnd.cpp | 17 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_wnd.h | 2 |
2 files changed, 3 insertions, 16 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.cpp b/fpdfsdk/pdfwindow/cpwl_wnd.cpp index 85a610eea5..e99d71b1de 100644 --- a/fpdfsdk/pdfwindow/cpwl_wnd.cpp +++ b/fpdfsdk/pdfwindow/cpwl_wnd.cpp @@ -152,7 +152,7 @@ void CPWL_Wnd::Create(const PWL_CREATEPARAM& cp) { CreateMsgControl(); if (m_sPrivateParam.pParentWnd) - m_sPrivateParam.pParentWnd->OnNotify(this, PNM_ADDCHILD); + m_sPrivateParam.pParentWnd->AddChild(this); PWL_CREATEPARAM ccp = m_sPrivateParam; @@ -196,7 +196,7 @@ void CPWL_Wnd::Destroy() { } } if (m_sPrivateParam.pParentWnd) - m_sPrivateParam.pParentWnd->OnNotify(this, PNM_REMOVECHILD); + m_sPrivateParam.pParentWnd->RemoveChild(this); m_bCreated = false; } @@ -425,18 +425,7 @@ void CPWL_Wnd::RemoveChild(CPWL_Wnd* pWnd) { void CPWL_Wnd::OnNotify(CPWL_Wnd* pWnd, uint32_t msg, intptr_t wParam, - intptr_t lParam) { - switch (msg) { - case PNM_ADDCHILD: - AddChild(pWnd); - break; - case PNM_REMOVECHILD: - RemoveChild(pWnd); - break; - default: - break; - } -} + intptr_t lParam) {} bool CPWL_Wnd::IsValid() const { return m_bCreated; diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.h b/fpdfsdk/pdfwindow/cpwl_wnd.h index 8d7cc32ec8..39ed4028a9 100644 --- a/fpdfsdk/pdfwindow/cpwl_wnd.h +++ b/fpdfsdk/pdfwindow/cpwl_wnd.h @@ -73,8 +73,6 @@ class IPWL_Provider; #define PRES_TEXTOVERFLOW 0x0400L // notification messages -#define PNM_ADDCHILD 0 -#define PNM_REMOVECHILD 1 #define PNM_SETSCROLLINFO 2 #define PNM_SETSCROLLPOS 3 #define PNM_SCROLLWINDOW 4 |