summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-05-01 17:22:44 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-01 17:22:44 +0000
commit302c8ce0ee78ecb10398c9b1fa2796d116bbb4a5 (patch)
tree4a3995149b3e9feb6017dd39bb22918feb46c6fb /fpdfsdk/fpdfxfa
parentba367068887aca9f700289aa1b8c198920ca39a2 (diff)
downloadpdfium-302c8ce0ee78ecb10398c9b1fa2796d116bbb4a5.tar.xz
Introduce the concept of CPDF_Page::Extension
Similar tp CPDF_Document::Extension, this is a base type for fpdfsdk/ to use to improve layering. While we're at it, make pages point to documents to prove they don't outlive them. Another small step towards not passing XFA objects across FPDF. Change-Id: Idcee9da3a18c06331fa56f3d6c188e4ce27d34f2 Reviewed-on: https://pdfium-review.googlesource.com/31631 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_page.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.h b/fpdfsdk/fpdfxfa/cpdfxfa_page.h
index 0a5e3fcc14..030b0684b6 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_page.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.h
@@ -9,24 +9,25 @@
#include <memory>
+#include "core/fpdfapi/page/cpdf_page.h"
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/retain_ptr.h"
#include "core/fxcrt/unowned_ptr.h"
#include "third_party/base/optional.h"
-class CPDFXFA_Context;
class CPDF_Dictionary;
-class CPDF_Page;
+class CPDFXFA_Context;
class CXFA_FFPageView;
-class CPDFXFA_Page : public Retainable {
+class CPDFXFA_Page : public CPDF_Page::Extension {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
bool LoadPage();
bool LoadPDFPage(CPDF_Dictionary* pageDict);
+
CPDFXFA_Context* GetContext() const { return m_pContext.Get(); }
int GetPageIndex() const { return m_iPageIndex; }
CPDF_Page* GetPDFPage() const { return m_pPDFPage.get(); }