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

Side by Side Diff: fpdfsdk/fpdfxfa/cpdfxfa_page.h

Issue 2469813004: Rename CPDFXFA_Document to CPDFXFA_Context (Closed)
Patch Set: Merge to master Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/fpdfxfa/cpdfxfa_document.cpp ('k') | fpdfsdk/fpdfxfa/cpdfxfa_page.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef FPDFSDK_FPDFXFA_CPDFXFA_PAGE_H_ 7 #ifndef FPDFSDK_FPDFXFA_CPDFXFA_PAGE_H_
8 #define FPDFSDK_FPDFXFA_CPDFXFA_PAGE_H_ 8 #define FPDFSDK_FPDFXFA_CPDFXFA_PAGE_H_
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "core/fxcrt/fx_system.h" 12 #include "core/fxcrt/fx_system.h"
13 13
14 class CFX_Matrix; 14 class CFX_Matrix;
15 class CPDFXFA_Document; 15 class CPDFXFA_Context;
16 class CPDF_Dictionary; 16 class CPDF_Dictionary;
17 class CPDF_Page; 17 class CPDF_Page;
18 class CXFA_FFPageView; 18 class CXFA_FFPageView;
19 19
20 class CPDFXFA_Page { 20 class CPDFXFA_Page {
21 public: 21 public:
22 CPDFXFA_Page(CPDFXFA_Document* pDoc, int page_index); 22 CPDFXFA_Page(CPDFXFA_Context* pContext, int page_index);
23 23
24 void Retain() { m_iRef++; } 24 void Retain() { m_iRef++; }
25 void Release() { 25 void Release() {
26 if (--m_iRef <= 0) 26 if (--m_iRef <= 0)
27 delete this; 27 delete this;
28 } 28 }
29 29
30 FX_BOOL LoadPage(); 30 FX_BOOL LoadPage();
31 FX_BOOL LoadPDFPage(CPDF_Dictionary* pageDict); 31 FX_BOOL LoadPDFPage(CPDF_Dictionary* pageDict);
32 CPDFXFA_Document* GetDocument() const { return m_pDocument; } 32 CPDFXFA_Context* GetContext() const { return m_pContext; }
33 int GetPageIndex() const { return m_iPageIndex; } 33 int GetPageIndex() const { return m_iPageIndex; }
34 CPDF_Page* GetPDFPage() const { return m_pPDFPage.get(); } 34 CPDF_Page* GetPDFPage() const { return m_pPDFPage.get(); }
35 CXFA_FFPageView* GetXFAPageView() const { return m_pXFAPageView; } 35 CXFA_FFPageView* GetXFAPageView() const { return m_pXFAPageView; }
36 36
37 void SetXFAPageView(CXFA_FFPageView* pPageView) { 37 void SetXFAPageView(CXFA_FFPageView* pPageView) {
38 m_pXFAPageView = pPageView; 38 m_pXFAPageView = pPageView;
39 } 39 }
40 40
41 FX_FLOAT GetPageWidth() const; 41 FX_FLOAT GetPageWidth() const;
42 FX_FLOAT GetPageHeight() const; 42 FX_FLOAT GetPageHeight() const;
(...skipping 27 matching lines...) Expand all
70 protected: 70 protected:
71 // Refcounted class. 71 // Refcounted class.
72 ~CPDFXFA_Page(); 72 ~CPDFXFA_Page();
73 73
74 FX_BOOL LoadPDFPage(); 74 FX_BOOL LoadPDFPage();
75 FX_BOOL LoadXFAPageView(); 75 FX_BOOL LoadXFAPageView();
76 76
77 private: 77 private:
78 std::unique_ptr<CPDF_Page> m_pPDFPage; 78 std::unique_ptr<CPDF_Page> m_pPDFPage;
79 CXFA_FFPageView* m_pXFAPageView; 79 CXFA_FFPageView* m_pXFAPageView;
80 CPDFXFA_Document* const m_pDocument; 80 CPDFXFA_Context* const m_pContext;
81 const int m_iPageIndex; 81 const int m_iPageIndex;
82 int m_iRef; 82 int m_iRef;
83 }; 83 };
84 84
85 #endif // FPDFSDK_FPDFXFA_CPDFXFA_PAGE_H_ 85 #endif // FPDFSDK_FPDFXFA_CPDFXFA_PAGE_H_
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfxfa/cpdfxfa_document.cpp ('k') | fpdfsdk/fpdfxfa/cpdfxfa_page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698