1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "pdf/pdfium/pdfium_mem_buffer_file_write.h"
9 PDFiumMemBufferFileWrite::PDFiumMemBufferFileWrite() {
11 WriteBlock
= &WriteBlockImpl
;
14 PDFiumMemBufferFileWrite::~PDFiumMemBufferFileWrite() {
17 int PDFiumMemBufferFileWrite::WriteBlockImpl(FPDF_FILEWRITE
* this_file_write
,
20 PDFiumMemBufferFileWrite
* mem_buffer_file_write
=
21 static_cast<PDFiumMemBufferFileWrite
*>(this_file_write
);
22 return mem_buffer_file_write
->DoWriteBlock(data
, size
);
25 int PDFiumMemBufferFileWrite::DoWriteBlock(const void* data
,
27 buffer_
.append(static_cast<const unsigned char*>(data
), size
);
32 } // namespace chrome_pdf