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

Side by Side Diff: fpdfsdk/include/fsdk_define.h

Issue 1396283006: Fix layering violation in CPDF_Document::FromFPDFDocument(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 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 | « core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp ('k') | fpdfsdk/src/fpdf_dataavail.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_INCLUDE_FSDK_DEFINE_H_ 7 #ifndef FPDFSDK_INCLUDE_FSDK_DEFINE_H_
8 #define FPDFSDK_INCLUDE_FSDK_DEFINE_H_ 8 #define FPDFSDK_INCLUDE_FSDK_DEFINE_H_
9 9
10 #include "../../core/include/fpdfapi/fpdf_module.h" 10 #include "../../core/include/fpdfapi/fpdf_module.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // IFX_FileRead 50 // IFX_FileRead
51 FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; } 51 FX_FILESIZE GetSize() override { return m_FileAccess.m_FileLen; }
52 void Release() override { delete this; } 52 void Release() override { delete this; }
53 FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; 53 FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override;
54 54
55 private: 55 private:
56 FPDF_FILEACCESS m_FileAccess; 56 FPDF_FILEACCESS m_FileAccess;
57 }; 57 };
58 58
59 // Conversions from FPDF_ types.
60 CPDF_Document* CPDFDocumentFromFPDFDocument(FPDF_DOCUMENT doc);
Tom Sepez 2015/10/15 17:45:56 Should this be an inline? Its just a cast or a ptr
Lei Zhang 2015/10/15 21:50:23 Will it actually make a measurable difference? Up
61
59 void DropContext(void* data); 62 void DropContext(void* data);
60 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable); 63 void FSDK_SetSandBoxPolicy(FPDF_DWORD policy, FPDF_BOOL enable);
61 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy); 64 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy);
62 void FPDF_RenderPage_Retail(CRenderContext* pContext, 65 void FPDF_RenderPage_Retail(CRenderContext* pContext,
63 FPDF_PAGE page, 66 FPDF_PAGE page,
64 int start_x, 67 int start_x,
65 int start_y, 68 int start_y,
66 int size_x, 69 int size_x,
67 int size_y, 70 int size_y,
68 int rotate, 71 int rotate,
69 int flags, 72 int flags,
70 FX_BOOL bNeedToRestore, 73 FX_BOOL bNeedToRestore,
71 IFSDK_PAUSE_Adapter* pause); 74 IFSDK_PAUSE_Adapter* pause);
72 75
73 void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code); 76 void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code);
74 void CheckUnSupportAnnot(CPDF_Document* pDoc, CPDF_Annot* pPDFAnnot); 77 void CheckUnSupportAnnot(CPDF_Document* pDoc, CPDF_Annot* pPDFAnnot);
75 void ProcessParseError(FX_DWORD err_code); 78 void ProcessParseError(FX_DWORD err_code);
76 79
77 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_ 80 #endif // FPDFSDK_INCLUDE_FSDK_DEFINE_H_
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp ('k') | fpdfsdk/src/fpdf_dataavail.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698