Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2841)

Unified Diff: core/fpdfapi/fpdf_page/include/cpdf_page.h

Issue 2008553008: Remove CFX_PrivateData from CPDF_Page (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix non-XFA build. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_page.cpp ('k') | core/fpdfdoc/include/fpdf_doc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/include/cpdf_page.h
diff --git a/core/fpdfapi/fpdf_page/include/cpdf_page.h b/core/fpdfapi/fpdf_page/include/cpdf_page.h
index 7f4430187ab4212d2a7df16df1151aed2cffe1e5..99734889afba4dc322b0ab0935b6d7aa4eab674e 100644
--- a/core/fpdfapi/fpdf_page/include/cpdf_page.h
+++ b/core/fpdfapi/fpdf_page/include/cpdf_page.h
@@ -19,8 +19,10 @@ class CPDF_Document;
class CPDF_Object;
class CPDF_PageRenderCache;
-class CPDF_Page : public CPDF_PageObjectHolder, public CFX_PrivateData {
+class CPDF_Page : public CPDF_PageObjectHolder {
public:
+ class View {}; // Caller implements as desired, empty here due to layering.
+
CPDF_Page(CPDF_Document* pDocument,
CPDF_Dictionary* pPageDict,
bool bPageCache);
@@ -42,6 +44,14 @@ class CPDF_Page : public CPDF_PageObjectHolder, public CFX_PrivateData {
CPDF_Object* GetPageAttr(const CFX_ByteString& name) const;
CPDF_PageRenderCache* GetRenderCache() const { return m_pPageRender.get(); }
+ CFX_Deletable* GetRenderContext() const { return m_pRenderContext.get(); }
+ void SetRenderContext(std::unique_ptr<CFX_Deletable> pContext) {
+ m_pRenderContext = std::move(pContext);
+ }
+
+ View* GetView() const { return m_pView; }
+ void SetView(View* pView) { m_pView = pView; }
+
protected:
friend class CPDF_ContentParser;
@@ -50,7 +60,9 @@ class CPDF_Page : public CPDF_PageObjectHolder, public CFX_PrivateData {
FX_FLOAT m_PageWidth;
FX_FLOAT m_PageHeight;
CFX_Matrix m_PageMatrix;
+ View* m_pView;
std::unique_ptr<CPDF_PageRenderCache> m_pPageRender;
+ std::unique_ptr<CFX_Deletable> m_pRenderContext;
};
#endif // CORE_FPDFAPI_FPDF_PAGE_INCLUDE_CPDF_PAGE_H_
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_page.cpp ('k') | core/fpdfdoc/include/fpdf_doc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698