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

Side by Side Diff: fpdfsdk/src/fpdfview.cpp

Issue 1088733002: Kill CFX_Object. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase. Created 5 years, 8 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 | « fpdfsdk/src/fpdf_dataavail.cpp ('k') | fpdfsdk/src/jsapi/fxjs_v8.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 #include "../include/fsdk_define.h" 7 #include "../include/fsdk_define.h"
8 #include "../include/fsdk_mgr.h" 8 #include "../include/fsdk_mgr.h"
9 #include "../include/fpdfview.h" 9 #include "../include/fpdfview.h"
10 #include "../include/fsdk_rendercontext.h" 10 #include "../include/fsdk_rendercontext.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 if (err_code) { 191 if (err_code) {
192 delete pParser; 192 delete pParser;
193 ProcessParseError(err_code); 193 ProcessParseError(err_code);
194 return NULL; 194 return NULL;
195 } 195 }
196 return pParser->GetDocument(); 196 return pParser->GetDocument();
197 } 197 }
198 198
199 extern void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code); 199 extern void CheckUnSupportError(CPDF_Document * pDoc, FX_DWORD err_code);
200 200
201 class CMemFile FX_FINAL: public IFX_FileRead, public CFX_Object 201 class CMemFile FX_FINAL: public IFX_FileRead
202 { 202 {
203 public: 203 public:
204 CMemFile(FX_BYTE* pBuf, FX_FILESIZE size):m_pBuf(pBuf),m_size(size) {} 204 CMemFile(FX_BYTE* pBuf, FX_FILESIZE size):m_pBuf(pBuf),m_size(size) {}
205 205
206 virtual void Release() {delete this;} 206 virtual void Release() {delete this;}
207 virtual FX_FILESIZE GetSize() {return m_size;} 207 virtual FX_FILESIZE GetSize() {return m_size;}
208 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offs et, size_t size) 208 virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offs et, size_t size)
209 { 209 {
210 if (offset < 0) { 210 if (offset < 0) {
211 return FALSE; 211 return FALSE;
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 if (!buffer) { 863 if (!buffer) {
864 buflen = len; 864 buflen = len;
865 } else if (buflen >= len) { 865 } else if (buflen >= len) {
866 memcpy(buffer, utf16Name.c_str(), len); 866 memcpy(buffer, utf16Name.c_str(), len);
867 buflen = len; 867 buflen = len;
868 } else { 868 } else {
869 buflen = -1; 869 buflen = -1;
870 } 870 }
871 return (FPDF_DEST)pDestObj; 871 return (FPDF_DEST)pDestObj;
872 } 872 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdf_dataavail.cpp ('k') | fpdfsdk/src/jsapi/fxjs_v8.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698