summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-01-05 16:46:58 -0800
committerLei Zhang <thestig@chromium.org>2016-01-05 16:46:58 -0800
commitc2fb35f2bbcf6c8fcf37380000544ae39d9a8cec (patch)
tree6b8da05d1624cbbe5a0c7042c9820f02180f442c /fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
parent62664cee15230d6cbe08ed010721a4557b36dc22 (diff)
downloadpdfium-c2fb35f2bbcf6c8fcf37380000544ae39d9a8cec.tar.xz
Merge to XFA: Remove header files that only have includes.
Also do some cleanups in affected files. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1552583002 . (cherry picked from commit d794d34b5deb6ad691c19af758090f9ce46015a3) Review URL: https://codereview.chromium.org/1566583002 .
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_Wnd.cpp')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Wnd.cpp35
1 files changed, 9 insertions, 26 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
index baa24cb8bf..9c4e21713b 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
@@ -6,13 +6,10 @@
#include <map>
-#include "fpdfsdk/include/pdfwindow/PDFWindow.h"
#include "fpdfsdk/include/pdfwindow/PWL_ScrollBar.h"
#include "fpdfsdk/include/pdfwindow/PWL_Utils.h"
#include "fpdfsdk/include/pdfwindow/PWL_Wnd.h"
-/* -------------------------- CPWL_Timer -------------------------- */
-
static std::map<int32_t, CPWL_Timer*>& GetPWLTimeMap() {
// Leak the object at shutdown.
static auto timeMap = new std::map<int32_t, CPWL_Timer*>;
@@ -58,8 +55,6 @@ void CPWL_Timer::TimerProc(int32_t idEvent) {
pTimer->m_pAttached->TimerProc();
}
-/* -------------------------- CPWL_TimerHandler -------------------------- */
-
CPWL_TimerHandler::CPWL_TimerHandler() : m_pTimer(NULL) {}
CPWL_TimerHandler::~CPWL_TimerHandler() {
@@ -81,20 +76,16 @@ void CPWL_TimerHandler::EndTimer() {
void CPWL_TimerHandler::TimerProc() {}
-/* --------------------------- CPWL_MsgControl ---------------------------- */
-
class CPWL_MsgControl {
friend class CPWL_Wnd;
public:
- CPWL_MsgControl(CPWL_Wnd* pWnd) {
- // PWL_TRACE("new CPWL_MsgControl\n");
+ explicit CPWL_MsgControl(CPWL_Wnd* pWnd) {
m_pCreatedWnd = pWnd;
Default();
}
~CPWL_MsgControl() {
- // PWL_TRACE("~CPWL_MsgControl\n");
Default();
}
@@ -114,10 +105,12 @@ class CPWL_MsgControl {
}
FX_BOOL IsWndCaptureMouse(const CPWL_Wnd* pWnd) const {
- if (pWnd)
- for (int32_t i = 0, sz = m_aMousePath.GetSize(); i < sz; i++)
+ if (pWnd) {
+ for (int32_t i = 0, sz = m_aMousePath.GetSize(); i < sz; i++) {
if (m_aMousePath.GetAt(i) == pWnd)
return TRUE;
+ }
+ }
return FALSE;
}
@@ -127,10 +120,12 @@ class CPWL_MsgControl {
}
FX_BOOL IsWndCaptureKeyboard(const CPWL_Wnd* pWnd) const {
- if (pWnd)
- for (int32_t i = 0, sz = m_aKeyboardPath.GetSize(); i < sz; i++)
+ if (pWnd) {
+ for (int32_t i = 0, sz = m_aKeyboardPath.GetSize(); i < sz; i++) {
if (m_aKeyboardPath.GetAt(i) == pWnd)
return TRUE;
+ }
+ }
return FALSE;
}
@@ -187,8 +182,6 @@ class CPWL_MsgControl {
CPWL_Wnd* m_pMainKeyboardWnd;
};
-/* --------------------------- CPWL_Wnd ---------------------------- */
-
CPWL_Wnd::CPWL_Wnd()
: m_pVScrollBar(NULL),
m_rcWindow(),
@@ -620,14 +613,6 @@ int32_t CPWL_Wnd::GetBorderWidth() const {
}
int32_t CPWL_Wnd::GetInnerBorderWidth() const {
- /*
- switch (GetBorderStyle())
- {
- case PBS_BEVELED:
- case PBS_INSET:
- return GetBorderWidth() / 2;
- }
- */
return 0;
}
@@ -902,8 +887,6 @@ CPWL_Color CPWL_Wnd::GetBorderRightBottomColor(int32_t nBorderStyle) const {
return color;
}
-/* ----------------------------------------------------------------- */
-
int32_t CPWL_Wnd::GetTransparency() {
return m_sPrivateParam.nTransparency;
}