summaryrefslogtreecommitdiff
path: root/fpdfsdk/include
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-09-07 09:55:37 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-07 09:55:37 -0700
commit1df1efa3921841fb5fc7fc15e8112eed4375de9f (patch)
tree9341f9698575b1451b88e1d826f10212db2d7eaf /fpdfsdk/include
parent85a65b310924eacbd2e720162cc7547153b03077 (diff)
downloadpdfium-1df1efa3921841fb5fc7fc15e8112eed4375de9f.tar.xz
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
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r--fpdfsdk/include/fsdk_mgr.h5
1 files changed, 3 insertions, 2 deletions
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;