summaryrefslogtreecommitdiff
path: root/fpdfsdk/fsdk_mgr.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-25 14:58:09 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-25 14:58:09 -0700
commit1e2c557e0fa0e47c8bafdb31c833ea4f90f5fedd (patch)
tree86c90cdb10f3c478570934816a56070ed6d51260 /fpdfsdk/fsdk_mgr.cpp
parentedfd3c3d6a56bee2456e96df4b945c095ea3a290 (diff)
downloadpdfium-1e2c557e0fa0e47c8bafdb31c833ea4f90f5fedd.tar.xz
Remove CFX_PrivateData from CPDF_Page
CFX_PrivateData served two purposes here: The first was to hold an opaque pointer to the corresponding page structure in the next higher layer, of which it knows no details. Introduce an empty CPDF_Page::View class to represent this higher class, so as to get type safety while preserving layering. The second was to hold an opaque render context, which it also happened to own. Make this a CFX_Deletable to help with management. Also remove an unused inheritance from CFX_PrivateData in CPDF_Annot. Review-Url: https://codereview.chromium.org/2008553008
Diffstat (limited to 'fpdfsdk/fsdk_mgr.cpp')
-rw-r--r--fpdfsdk/fsdk_mgr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index fac98d8aa3..83fee907d2 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -480,7 +480,7 @@ CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc,
#endif // PDF_ENABLE_XFA
}
#ifndef PDF_ENABLE_XFA
- m_page->SetPrivateData((void*)m_page, (void*)this, nullptr);
+ m_page->SetView(this);
#endif // PDF_ENABLE_XFA
}
@@ -493,7 +493,7 @@ CPDFSDK_PageView::~CPDFSDK_PageView() {
m_fxAnnotArray.clear();
m_pAnnotList.reset();
#ifndef PDF_ENABLE_XFA
- m_page->RemovePrivateData((void*)m_page);
+ m_page->SetView(nullptr);
if (m_bTakeOverPage) {
delete m_page;
}