summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/cpdf_page.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/core/fpdfapi/page/cpdf_page.h b/core/fpdfapi/page/cpdf_page.h
index 28a12f45b5..0bb99b73f1 100644
--- a/core/fpdfapi/page/cpdf_page.h
+++ b/core/fpdfapi/page/cpdf_page.h
@@ -10,7 +10,6 @@
#include <memory>
#include "core/fpdfapi/page/cpdf_pageobjectholder.h"
-#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/retain_ptr.h"
@@ -23,19 +22,13 @@ class CPDF_Object;
class CPDF_PageRenderCache;
class CPDF_PageRenderContext;
-class CPDF_Page : public CPDF_PageObjectHolder {
+class CPDF_Page : public Retainable, public CPDF_PageObjectHolder {
public:
class View {}; // Caller implements as desired, empty here due to layering.
+ class Extension : public Retainable {}; // XFA page parent class, layering.
- // XFA page parent class, layering.
- class Extension : public Retainable {
- virtual CPDF_Document::Extension* GetDocumentExtension() const = 0;
- };
-
- CPDF_Page(CPDF_Document* pDocument,
- CPDF_Dictionary* pPageDict,
- bool bPageCache);
- ~CPDF_Page() override;
+ template <typename T, typename... Args>
+ friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
// CPDF_PageObjectHolder:
bool IsPage() const override;
@@ -71,6 +64,11 @@ class CPDF_Page : public CPDF_PageObjectHolder {
void SetPageExtension(Extension* pExt) { m_pPageExtension = pExt; }
private:
+ CPDF_Page(CPDF_Document* pDocument,
+ CPDF_Dictionary* pPageDict,
+ bool bPageCache);
+ ~CPDF_Page() override;
+
void StartParse();
CPDF_Object* GetPageAttr(const ByteString& name) const;