From 940967de0b588d3abb9cba5822ae5f5c5fe05017 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 18 May 2017 12:32:20 -0700 Subject: Use Unowned/Observed pointers between doc and FF onwership hierarchies. See the explanation in CPDFSDK_FormFillEnvironment.h Change-Id: I52feb25fb358831233a636e3ead5aa70e98c5baa Reviewed-on: https://pdfium-review.googlesource.com/5658 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- fpdfsdk/cfx_systemhandler.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'fpdfsdk/cfx_systemhandler.h') diff --git a/fpdfsdk/cfx_systemhandler.h b/fpdfsdk/cfx_systemhandler.h index 82cfc531ca..aa243c0e11 100644 --- a/fpdfsdk/cfx_systemhandler.h +++ b/fpdfsdk/cfx_systemhandler.h @@ -7,6 +7,7 @@ #ifndef FPDFSDK_CFX_SYSTEMHANDLER_H_ #define FPDFSDK_CFX_SYSTEMHANDLER_H_ +#include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_coordinates.h" #include "core/fxcrt/fx_system.h" @@ -49,16 +50,13 @@ class CPDFSDK_Widget; class CFX_SystemHandler { public: - explicit CFX_SystemHandler(CPDFSDK_FormFillEnvironment* pFormFillEnv) - : m_pFormFillEnv(pFormFillEnv) {} - ~CFX_SystemHandler() {} + explicit CFX_SystemHandler(CPDFSDK_FormFillEnvironment* pFormFillEnv); + ~CFX_SystemHandler(); void InvalidateRect(CPDFSDK_Widget* widget, FX_RECT rect); void OutputSelectedRect(CFFL_FormFiller* pFormFiller, CFX_FloatRect& rect); bool IsSelectionImplemented() const; - void SetCursor(int32_t nCursorType); - bool FindNativeTrueTypeFont(CFX_ByteString sFontFaceName); CPDF_Font* AddNativeTrueTypeFontToPDF(CPDF_Document* pDoc, CFX_ByteString sFontFaceName, @@ -66,13 +64,12 @@ class CFX_SystemHandler { int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc); void KillTimer(int32_t nID); - bool IsSHIFTKeyDown(uint32_t nFlag) const; bool IsCTRLKeyDown(uint32_t nFlag) const; bool IsALTKeyDown(uint32_t nFlag) const; private: - CPDFSDK_FormFillEnvironment* const m_pFormFillEnv; + CFX_UnownedPtr const m_pFormFillEnv; }; #endif // FPDFSDK_CFX_SYSTEMHANDLER_H_ -- cgit v1.2.3