diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-01-09 10:46:50 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-01-09 10:46:50 -0800 |
commit | b9e0190938f62bf21df078e47190a62ba33ddab2 (patch) | |
tree | 474749da63ac6890c008f9535b335bebee1d7cc8 /fpdfsdk/include/javascript/IJavaScript.h | |
parent | b07772a31f5dff723af620bc57c71daa246995c0 (diff) | |
download | pdfium-b9e0190938f62bf21df078e47190a62ba33ddab2.tar.xz |
Fix -Wnon-virtual-dtor compiler warnings.
This is done by explicitly adding a virtual dtor to interface classes,
since the cost is small given that there are already virtual functions.
The exceptions are for classes that have a Release() or Delete() method,
in which case it is non-virtual and protected to indicate that the virtual
class is never the deletion point.
BUG=
R=brucedawson@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/810883005
Diffstat (limited to 'fpdfsdk/include/javascript/IJavaScript.h')
-rw-r--r-- | fpdfsdk/include/javascript/IJavaScript.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fpdfsdk/include/javascript/IJavaScript.h b/fpdfsdk/include/javascript/IJavaScript.h index 7633bbb486..8ea9a4e89f 100644 --- a/fpdfsdk/include/javascript/IJavaScript.h +++ b/fpdfsdk/include/javascript/IJavaScript.h @@ -11,13 +11,13 @@ namespace v8 { class Platform; } -class IFXJS_Context +class IFXJS_Context { public: + virtual ~IFXJS_Context() { } virtual FX_BOOL Compile(const CFX_WideString& script, CFX_WideString& info) = 0; virtual FX_BOOL RunScript(const CFX_WideString& script, CFX_WideString& info) = 0; -public: virtual void OnApp_Init() = 0; virtual void OnDoc_Open(CPDFSDK_Document* pDoc, const CFX_WideString& strTargetName) = 0; @@ -31,7 +31,7 @@ public: virtual void OnPage_Close(CPDFSDK_Document* pTarget) = 0; virtual void OnPage_InView(CPDFSDK_Document* pTarget) = 0; virtual void OnPage_OutView(CPDFSDK_Document* pTarget) = 0; - + virtual void OnField_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget) = 0; virtual void OnField_MouseEnter(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget) = 0; virtual void OnField_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget) = 0; @@ -88,6 +88,9 @@ public: virtual void Exit() = 0; virtual void Enter() = 0; virtual FX_BOOL IsEntered() = 0; + +protected: + ~IFXJS_Runtime() { } }; class CPDFDoc_Environment; |