From 1df1efa3921841fb5fc7fc15e8112eed4375de9f Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 7 Sep 2016 09:55:37 -0700 Subject: Fixup CPDFSDK_PageView and CPDF_Page interactions. There are several issues when CPDFSDK_PageView and CPDF_Page interact, especially around deletion. This Cl fixes up several places where things go wrong working with these objects. BUG=chromium:632709 Review-Url: https://codereview.chromium.org/2319663002 --- fpdfsdk/include/fsdk_mgr.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/include/fsdk_mgr.h') diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h index 924cd444e0..f37e64fe41 100644 --- a/fpdfsdk/include/fsdk_mgr.h +++ b/fpdfsdk/include/fsdk_mgr.h @@ -605,7 +605,8 @@ class CPDFSDK_PageView final : public CPDF_Page::View { void SetLock(FX_BOOL bLocked) { m_bLocked = bLocked; } FX_BOOL IsLocked() { return m_bLocked; } #ifndef PDF_ENABLE_XFA - void TakeOverPage() { m_bTakeOverPage = TRUE; } + bool OwnsPage() const { return m_bOwnsPage; } + void TakePageOwnership() { m_bOwnsPage = true; } #endif // PDF_ENABLE_XFA private: @@ -618,7 +619,7 @@ class CPDFSDK_PageView final : public CPDF_Page::View { CPDFSDK_Document* const m_pSDKDoc; CPDFSDK_Annot* m_CaptureWidget; #ifndef PDF_ENABLE_XFA - FX_BOOL m_bTakeOverPage; + bool m_bOwnsPage; #endif // PDF_ENABLE_XFA FX_BOOL m_bEnterWidget; FX_BOOL m_bExitWidget; -- cgit v1.2.3