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

Side by Side Diff: core/fpdfapi/parser/cpdf_document.h

Issue 2435783006: Add CPDF_Document::GetPage() unittests (Closed)
Patch Set: Use unique_ptr Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | core/fpdfapi/parser/cpdf_document_unittest.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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_
8 #define CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ 8 #define CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_
9 9
10 #include <functional> 10 #include <functional>
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 CPDF_Font* AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert); 95 CPDF_Font* AddFont(CFX_Font* pFont, int charset, FX_BOOL bVert);
96 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ 96 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
97 CPDF_Font* AddWindowsFont(LOGFONTA* pLogFont, 97 CPDF_Font* AddWindowsFont(LOGFONTA* pLogFont,
98 FX_BOOL bVert, 98 FX_BOOL bVert,
99 FX_BOOL bTranslateName = FALSE); 99 FX_BOOL bTranslateName = FALSE);
100 CPDF_Font* AddWindowsFont(LOGFONTW* pLogFont, 100 CPDF_Font* AddWindowsFont(LOGFONTW* pLogFont,
101 FX_BOOL bVert, 101 FX_BOOL bVert,
102 FX_BOOL bTranslateName = FALSE); 102 FX_BOOL bTranslateName = FALSE);
103 #endif 103 #endif
104 104
105 private: 105 protected:
106 friend class CPDF_TestDocument;
107
108 // Retrieve page count information by getting count value from the tree nodes 106 // Retrieve page count information by getting count value from the tree nodes
109 int RetrievePageCount() const; 107 int RetrievePageCount() const;
110 CPDF_Dictionary* FindPDFPage(CPDF_Dictionary* pPages, 108 CPDF_Dictionary* FindPDFPage(CPDF_Dictionary* pPages,
111 int iPage, 109 int iPage,
112 int nPagesToGo, 110 int nPagesToGo,
113 int level); 111 int level);
114 int FindPageIndex(CPDF_Dictionary* pNode, 112 int FindPageIndex(CPDF_Dictionary* pNode,
115 uint32_t& skip_count, 113 uint32_t& skip_count,
116 uint32_t objnum, 114 uint32_t objnum,
117 int& index, 115 int& index,
(...skipping 18 matching lines...) Expand all
136 // TODO(thestig): Figure out why this cannot be a std::unique_ptr. 134 // TODO(thestig): Figure out why this cannot be a std::unique_ptr.
137 CPDF_DocPageData* m_pDocPage; 135 CPDF_DocPageData* m_pDocPage;
138 std::unique_ptr<CPDF_DocRenderData> m_pDocRender; 136 std::unique_ptr<CPDF_DocRenderData> m_pDocRender;
139 std::unique_ptr<JBig2_DocumentContext> m_pCodecContext; 137 std::unique_ptr<JBig2_DocumentContext> m_pCodecContext;
140 std::unique_ptr<CPDF_LinkList> m_pLinksContext; 138 std::unique_ptr<CPDF_LinkList> m_pLinksContext;
141 CFX_ArrayTemplate<uint32_t> m_PageList; 139 CFX_ArrayTemplate<uint32_t> m_PageList;
142 CFX_WeakPtr<CFX_ByteStringPool> m_pByteStringPool; 140 CFX_WeakPtr<CFX_ByteStringPool> m_pByteStringPool;
143 }; 141 };
144 142
145 #endif // CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ 143 #endif // CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | core/fpdfapi/parser/cpdf_document_unittest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698