From 568aff520b4ca33d851317a4ea88807b4fd2da40 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 19 Jun 2015 14:58:28 -0700 Subject: Fix -Wnon-virtual-dtor warnings on the XFA branch. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1183483003. --- xfa/include/fwl/core/fwl_form.h | 1 + xfa/include/fwl/core/fwl_note.h | 3 +++ xfa/include/fwl/core/fwl_theme.h | 1 + xfa/include/fwl/core/fwl_timer.h | 1 + xfa/include/fwl/core/fwl_widget.h | 4 ++++ xfa/include/fwl/core/fwl_widgetmgr.h | 2 ++ 6 files changed, 12 insertions(+) (limited to 'xfa/include/fwl/core') diff --git a/xfa/include/fwl/core/fwl_form.h b/xfa/include/fwl/core/fwl_form.h index eb0b083008..e9a8323f20 100644 --- a/xfa/include/fwl/core/fwl_form.h +++ b/xfa/include/fwl/core/fwl_form.h @@ -42,6 +42,7 @@ class IFWL_Form; #define FWL_PARTSTATE_FRM_Pressed 3 #define FWL_PARTSTATE_FRM_Inactive 4 #define FWL_PARTSTATE_FRM_Disabled 5 + class IFWL_FormDP : public IFWL_DataProvider { public: diff --git a/xfa/include/fwl/core/fwl_note.h b/xfa/include/fwl/core/fwl_note.h index ea8328fffb..c423cd5a24 100644 --- a/xfa/include/fwl/core/fwl_note.h +++ b/xfa/include/fwl/core/fwl_note.h @@ -346,6 +346,7 @@ typedef enum { class IFWL_NoteDriver { public: + virtual ~IFWL_NoteDriver() {} virtual FX_BOOL SendNote(CFWL_Note *pNote) = 0; virtual FX_BOOL PostMessage(CFWL_Message *pMessage) = 0; virtual FWL_ERR RegisterEventTarget(IFWL_Widget *pListener, IFWL_Widget *pEventSource = NULL, FX_DWORD dwFilter = FWL_EVENT_ALL_MASK) = 0; @@ -363,12 +364,14 @@ IFWL_Widget* FWL_GetCurrentThreadModalWidget(IFWL_NoteThread *pNoteThread); class IFWL_NoteLoop { public: + virtual ~IFWL_NoteLoop() {} virtual FX_BOOL PreProcessMessage(CFWL_Message *pMessage) = 0; virtual FWL_ERR Idle(int32_t count) = 0; }; class IFWL_ToolTipTarget { public: + virtual ~IFWL_ToolTipTarget() {} virtual IFWL_Widget* GetWidget() = 0; virtual FX_BOOL IsShowed() = 0; virtual FWL_ERR DrawToolTip(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix, IFWL_Widget *pToolTip) = 0; diff --git a/xfa/include/fwl/core/fwl_theme.h b/xfa/include/fwl/core/fwl_theme.h index 9ab970b47c..94e81771a9 100644 --- a/xfa/include/fwl/core/fwl_theme.h +++ b/xfa/include/fwl/core/fwl_theme.h @@ -75,6 +75,7 @@ public: class IFWL_ThemeProvider { public: + virtual ~IFWL_ThemeProvider() {} virtual FX_BOOL IsValidWidget(IFWL_Widget *pWidget) = 0; virtual FX_DWORD GetThemeID(IFWL_Widget *pWidget) = 0; virtual FX_DWORD SetThemeID(IFWL_Widget *pWidget, FX_DWORD dwThemeID, FX_BOOL bChildren = TRUE) = 0; diff --git a/xfa/include/fwl/core/fwl_timer.h b/xfa/include/fwl/core/fwl_timer.h index a12f92a9d3..eae5bf48b4 100644 --- a/xfa/include/fwl/core/fwl_timer.h +++ b/xfa/include/fwl/core/fwl_timer.h @@ -13,6 +13,7 @@ typedef struct _FWL_HTIMER { class IFWL_Timer { public: + virtual ~IFWL_Timer() {} virtual int32_t Run(FWL_HTIMER hTimer) = 0; }; FWL_HTIMER FWL_StartTimer(IFWL_Timer *pTimer, FX_DWORD dwElapse, FX_BOOL bImmediately = TRUE); diff --git a/xfa/include/fwl/core/fwl_widget.h b/xfa/include/fwl/core/fwl_widget.h index b6377cdc9f..6c3164c5e0 100644 --- a/xfa/include/fwl/core/fwl_widget.h +++ b/xfa/include/fwl/core/fwl_widget.h @@ -15,9 +15,11 @@ class IFWL_WidgetDelegate; class IFWL_Custom; class IFWL_Proxy; class IFWL_Form; + class IFWL_DataProvider { public: + virtual ~IFWL_DataProvider() {} virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption) = 0; }; class IFWL_Widget : public IFWL_Target @@ -59,6 +61,7 @@ public: class IFWL_WidgetDelegate { public: + virtual ~IFWL_WidgetDelegate() {} virtual int32_t OnProcessMessage(CFWL_Message *pMessage) = 0; virtual FWL_ERR OnProcessEvent(CFWL_Event *pEvent) = 0; virtual FWL_ERR OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL) = 0; @@ -103,6 +106,7 @@ protected: class IFWL_Proxy { public: + virtual ~IFWL_Proxy() {} virtual FWL_ERR GetWidgetRect(CFX_RectF &rect, FX_BOOL bAutoSize = FALSE) = 0; virtual FWL_ERR Update() = 0; }; diff --git a/xfa/include/fwl/core/fwl_widgetmgr.h b/xfa/include/fwl/core/fwl_widgetmgr.h index 95ff26a84c..f658476636 100644 --- a/xfa/include/fwl/core/fwl_widgetmgr.h +++ b/xfa/include/fwl/core/fwl_widgetmgr.h @@ -23,6 +23,7 @@ enum FWL_WGTRELATION { class IFWL_WidgetMgr { public: + virtual ~IFWL_WidgetMgr() {} virtual int32_t CountWidgets(IFWL_Widget *pParent = NULL) = 0; virtual IFWL_Widget* GetWidget(int32_t nIndex, IFWL_Widget *pParent = NULL) = 0; virtual IFWL_Widget* GetWidget(IFWL_Widget *pWidget, FWL_WGTRELATION eRelation) = 0; @@ -39,6 +40,7 @@ FX_BOOL FWL_WidgetIsChild(IFWL_Widget *parent, IFWL_Widget *find); class IFWL_WidgetMgrDelegate { public: + virtual ~IFWL_WidgetMgrDelegate() {} virtual FWL_ERR OnSetCapability(FX_DWORD dwCapability = FWL_WGTMGR_DisableThread) = 0; virtual int32_t OnProcessMessageToForm(CFWL_Message *pMessage) = 0; virtual FWL_ERR OnDrawWidget(IFWL_Widget *pWidget, CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL) = 0; -- cgit v1.2.3