Chromium Code Reviews

Unified Diff: pdf/pdfium/pdfium_mem_buffer_file_read.h

Issue 294793003: Add the pdf plugin's source in src\pdf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: review comments and sync past DEPS roll to fix gyp Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: pdf/pdfium/pdfium_mem_buffer_file_read.h
===================================================================
--- pdf/pdfium/pdfium_mem_buffer_file_read.h (revision 0)
+++ pdf/pdfium/pdfium_mem_buffer_file_read.h (revision 0)
@@ -0,0 +1,30 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_READ_H_
+#define PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_READ_H_
+
+#include <stdlib.h>
+
+#include "third_party/pdfium/fpdfsdk/include/fpdfview.h"
+
+namespace chrome_pdf {
+
+// Implementation of FPDF_FILEACCESS from a memory buffer.
+class PDFiumMemBufferFileRead : public FPDF_FILEACCESS {
+ public:
+ PDFiumMemBufferFileRead(const void* data, size_t size);
+ ~PDFiumMemBufferFileRead();
+
+ private:
+ static int GetBlock(void* param,
+ unsigned long position,
+ unsigned char* buf,
+ unsigned long size);
+ const unsigned char* data_;
+};
+
+} // namespace chrome_pdf
+
+#endif // PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_READ_H_
Property changes on: pdf\pdfium\pdfium_mem_buffer_file_read.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine