summaryrefslogtreecommitdiff
path: root/xfa/fwl/core
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-13 12:04:43 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-13 12:04:43 -0700
commit380f20a6000bd640d7fd8f1567961f1f05d79f5a (patch)
treeba8dd6ef2825381171eca97a3b90de9fd7d9ed07 /xfa/fwl/core
parenta654f0d0889c50d0995bd873c119ae75b0ab5a09 (diff)
downloadpdfium-380f20a6000bd640d7fd8f1567961f1f05d79f5a.tar.xz
Remove some FWL code.
Remove unused or ifdef'd code from FWL. Review URL: https://codereview.chromium.org/1874963002
Diffstat (limited to 'xfa/fwl/core')
-rw-r--r--xfa/fwl/core/cfwl_event.h14
-rw-r--r--xfa/fwl/core/fwl_formimp.h11
-rw-r--r--xfa/fwl/core/fwl_sdadapterimp.cpp20
-rw-r--r--xfa/fwl/core/fwl_sdadapterimp.h7
-rw-r--r--xfa/fwl/core/fwl_threadimp.cpp14
-rw-r--r--xfa/fwl/core/fwl_threadimp.h2
-rw-r--r--xfa/fwl/core/ifwl_adapterthreadmgr.h8
-rw-r--r--xfa/fwl/core/ifwl_form.h11
-rw-r--r--xfa/fwl/core/ifwl_thread.h3
9 files changed, 11 insertions, 79 deletions
diff --git a/xfa/fwl/core/cfwl_event.h b/xfa/fwl/core/cfwl_event.h
index 5f7a135372..b2f88802f9 100644
--- a/xfa/fwl/core/cfwl_event.h
+++ b/xfa/fwl/core/cfwl_event.h
@@ -13,19 +13,7 @@
#include "xfa/fwl/core/cfwl_note.h"
#include "xfa/fwl/core/fwl_error.h"
-#define FWL_EVT_Mouse L"FWL_EVENT_Mouse"
-#define FWL_EVT_MouseWheel L"FWL_EVENT_MouseWheel"
-#define FWL_EVT_Key L"FWL_EVENT_Key"
-#define FWL_EVT_SetFocus L"FWL_EVENT_SetFocus"
-#define FWL_EVT_KillFocus L"FWL_EVENT_KillFocus"
-#define FWL_EVT_Click L"FWL_EVENT_Click"
-#define FWL_EVT_Draw L"FWL_EVENT_Draw"
-#define FWL_EVT_Scroll L"FWL_EVENT_Scroll"
-#define FWL_EVT_Close L"FWL_EVENT_Close"
-#define FWL_EVT_ContextMenu L"FWL_EVENT_ContextMenu"
-#define FWL_EVT_MenuCommand L"FWL_EVENT_MenuCommand"
-#define FWL_EVT_SizeChanged L"FWL_EVENT_SizeChanged"
-
+// TODO(dsinclair): Event hash is hash of string, cleanup. pdfium:474
#define FWL_EVTHASH_Mouse 1765258002
#define FWL_EVTHASH_MouseWheel 3907114407
#define FWL_EVTHASH_Key 2408354450
diff --git a/xfa/fwl/core/fwl_formimp.h b/xfa/fwl/core/fwl_formimp.h
index fbfdfae271..766cd85cbf 100644
--- a/xfa/fwl/core/fwl_formimp.h
+++ b/xfa/fwl/core/fwl_formimp.h
@@ -55,22 +55,17 @@ class CFWL_SysBtn {
CFX_RectF m_rtBtn;
uint32_t m_dwState;
};
+
enum FORM_RESIZETYPE {
FORM_RESIZETYPE_None = 0,
FORM_RESIZETYPE_Cap,
- FORM_RESIZETYPE_Left,
- FORM_RESIZETYPE_Top,
- FORM_RESIZETYPE_Right,
- FORM_RESIZETYPE_Bottom,
- FORM_RESIZETYPE_LeftTop,
- FORM_RESIZETYPE_LeftBottom,
- FORM_RESIZETYPE_RightTop,
- FORM_RESIZETYPE_RightBottom
};
+
typedef struct RestoreResizeInfo {
CFX_PointF m_ptStart;
CFX_SizeF m_szStart;
} RestoreInfo;
+
class CFWL_FormImp : public CFWL_PanelImp {
public:
CFWL_FormImp(const CFWL_WidgetImpProperties& properties, IFWL_Widget* pOuter);
diff --git a/xfa/fwl/core/fwl_sdadapterimp.cpp b/xfa/fwl/core/fwl_sdadapterimp.cpp
index 2e9d740e40..50246517cc 100644
--- a/xfa/fwl/core/fwl_sdadapterimp.cpp
+++ b/xfa/fwl/core/fwl_sdadapterimp.cpp
@@ -151,25 +151,11 @@ FX_BOOL CFWL_SDAdapterWidgetMgr::GetPopupPos(IFWL_Widget* pWidget,
CFX_RectF& rtPopup) {
return FWL_ERR_Succeeded;
}
+
CFWL_SDAdapterThreadMgr::CFWL_SDAdapterThreadMgr() {}
+
CFWL_SDAdapterThreadMgr::~CFWL_SDAdapterThreadMgr() {}
-FWL_ERR CFWL_SDAdapterThreadMgr::Start(IFWL_Thread* pThread,
- FWL_HTHREAD& hThread,
- FX_BOOL bSuspended) {
- return FWL_ERR_Succeeded;
-}
-FWL_ERR CFWL_SDAdapterThreadMgr::Resume(FWL_HTHREAD hThread) {
- return FWL_ERR_Succeeded;
-}
-FWL_ERR CFWL_SDAdapterThreadMgr::Suspend(FWL_HTHREAD hThread) {
- return FWL_ERR_Succeeded;
-}
-FWL_ERR CFWL_SDAdapterThreadMgr::Kill(FWL_HTHREAD hThread, int32_t iExitCode) {
- return FWL_ERR_Succeeded;
-}
-FWL_ERR CFWL_SDAdapterThreadMgr::Stop(FWL_HTHREAD hThread, int32_t iExitCode) {
- return FWL_ERR_Succeeded;
-}
+
IFWL_Thread* CFWL_SDAdapterThreadMgr::GetCurrentThread() {
return FWL_GetApp();
}
diff --git a/xfa/fwl/core/fwl_sdadapterimp.h b/xfa/fwl/core/fwl_sdadapterimp.h
index 2bc69796fb..3968b22ab6 100644
--- a/xfa/fwl/core/fwl_sdadapterimp.h
+++ b/xfa/fwl/core/fwl_sdadapterimp.h
@@ -76,13 +76,6 @@ class CFWL_SDAdapterThreadMgr : public IFWL_AdapterThreadMgr {
~CFWL_SDAdapterThreadMgr();
public:
- virtual FWL_ERR Start(IFWL_Thread* pThread,
- FWL_HTHREAD& hThread,
- FX_BOOL bSuspended = FALSE);
- virtual FWL_ERR Resume(FWL_HTHREAD hThread);
- virtual FWL_ERR Suspend(FWL_HTHREAD hThread);
- virtual FWL_ERR Kill(FWL_HTHREAD hThread, int32_t iExitCode);
- virtual FWL_ERR Stop(FWL_HTHREAD hThread, int32_t iExitCode);
virtual IFWL_Thread* GetCurrentThread();
};
diff --git a/xfa/fwl/core/fwl_threadimp.cpp b/xfa/fwl/core/fwl_threadimp.cpp
index 66c57ebee6..bc58a76f04 100644
--- a/xfa/fwl/core/fwl_threadimp.cpp
+++ b/xfa/fwl/core/fwl_threadimp.cpp
@@ -14,26 +14,18 @@
void IFWL_Thread::Release() {
delete m_pImpl;
}
-FWL_ERR IFWL_Thread::Run(FWL_HTHREAD hThread) {
- return m_pImpl->Run(hThread);
-}
+
IFWL_NoteDriver* IFWL_NoteThread::GetNoteDriver() {
return static_cast<CFWL_NoteThreadImp*>(GetImpl())->GetNoteDriver();
}
-FWL_ERR CFWL_ThreadImp::Run(FWL_HTHREAD hThread) {
- return FWL_ERR_Succeeded;
-}
CFWL_NoteThreadImp::CFWL_NoteThreadImp(IFWL_NoteThread* pIface)
: CFWL_ThreadImp(pIface), m_pNoteDriver(new CFWL_NoteDriver) {}
+
CFWL_NoteThreadImp::~CFWL_NoteThreadImp() {
delete m_pNoteDriver;
}
-FWL_ERR CFWL_NoteThreadImp::Run(FWL_HTHREAD hThread) {
- if (!m_pNoteDriver)
- return FWL_ERR_Indefinite;
- return m_pNoteDriver->Run();
-}
+
IFWL_NoteDriver* CFWL_NoteThreadImp::GetNoteDriver() {
return m_pNoteDriver;
}
diff --git a/xfa/fwl/core/fwl_threadimp.h b/xfa/fwl/core/fwl_threadimp.h
index 3806f3ca4b..e1787d9d31 100644
--- a/xfa/fwl/core/fwl_threadimp.h
+++ b/xfa/fwl/core/fwl_threadimp.h
@@ -17,7 +17,6 @@ class CFWL_ThreadImp {
public:
virtual ~CFWL_ThreadImp() {}
IFWL_Thread* GetInterface() const { return m_pIface; }
- virtual FWL_ERR Run(FWL_HTHREAD hThread);
protected:
CFWL_ThreadImp(IFWL_Thread* pIface) : m_pIface(pIface) {}
@@ -31,7 +30,6 @@ class CFWL_NoteThreadImp : public CFWL_ThreadImp {
CFWL_NoteThreadImp(IFWL_NoteThread* pIface);
virtual ~CFWL_NoteThreadImp();
- FWL_ERR Run(FWL_HTHREAD hThread) override;
virtual IFWL_NoteDriver* GetNoteDriver();
protected:
diff --git a/xfa/fwl/core/ifwl_adapterthreadmgr.h b/xfa/fwl/core/ifwl_adapterthreadmgr.h
index 821ced3164..dec5010b49 100644
--- a/xfa/fwl/core/ifwl_adapterthreadmgr.h
+++ b/xfa/fwl/core/ifwl_adapterthreadmgr.h
@@ -14,13 +14,7 @@
class IFWL_AdapterThreadMgr {
public:
virtual ~IFWL_AdapterThreadMgr() {}
- virtual FWL_ERR Start(IFWL_Thread* pThread,
- FWL_HTHREAD& hThread,
- FX_BOOL bSuspended = FALSE) = 0;
- virtual FWL_ERR Resume(FWL_HTHREAD hThread) = 0;
- virtual FWL_ERR Suspend(FWL_HTHREAD hThread) = 0;
- virtual FWL_ERR Kill(FWL_HTHREAD hThread, int32_t iExitCode) = 0;
- virtual FWL_ERR Stop(FWL_HTHREAD hThread, int32_t iExitCode) = 0;
+
virtual IFWL_Thread* GetCurrentThread() = 0;
};
diff --git a/xfa/fwl/core/ifwl_form.h b/xfa/fwl/core/ifwl_form.h
index b5cb72b181..0022759436 100644
--- a/xfa/fwl/core/ifwl_form.h
+++ b/xfa/fwl/core/ifwl_form.h
@@ -55,17 +55,6 @@ enum FWL_FORMSIZE {
FWL_FORMSIZE_All,
};
-enum FWL_COMMANDID {
- FWL_COMMANDID_Close = 0,
- FWL_COMMANDID_Ok,
- FWL_COMMANDID_Cancel,
- FWL_COMMANDID_Abort,
- FWL_COMMANDID_Retry,
- FWL_COMMANDID_Ignore,
- FWL_COMMANDID_Yes,
- FWL_COMMANDID_No,
-};
-
class CFX_DIBitmap;
class CFX_WideString;
class CFX_Path;
diff --git a/xfa/fwl/core/ifwl_thread.h b/xfa/fwl/core/ifwl_thread.h
index c6f0c445d1..d05aa6da0c 100644
--- a/xfa/fwl/core/ifwl_thread.h
+++ b/xfa/fwl/core/ifwl_thread.h
@@ -27,13 +27,10 @@
class CFWL_ThreadImp;
class IFWL_NoteDriver;
-typedef struct FWL_HTHREAD_ { void* pData; } * FWL_HTHREAD;
-
class IFWL_Thread {
public:
// These call into polymorphic methods in the impl; no need to override.
void Release();
- FWL_ERR Run(FWL_HTHREAD hThread);
CFWL_ThreadImp* GetImpl() const { return m_pImpl; }
void SetImpl(CFWL_ThreadImp* pImpl) { m_pImpl = pImpl; }