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

Side by Side Diff: pdf/pdfium/pdfium_mem_buffer_file_write.cc

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 Created 6 years, 7 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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.
4
5 #include "pdf/pdfium/pdfium_mem_buffer_file_write.h"
6
7 namespace chrome_pdf {
8
9 PDFiumMemBufferFileWrite::PDFiumMemBufferFileWrite() {
10 version = 1;
11 WriteBlock = &WriteBlockImpl;
12 }
13
14 PDFiumMemBufferFileWrite::~PDFiumMemBufferFileWrite() {
15 }
16
17 int PDFiumMemBufferFileWrite::WriteBlockImpl(FPDF_FILEWRITE* this_file_write,
18 const void* data,
19 unsigned long size) {
20 PDFiumMemBufferFileWrite* mem_buffer_file_write =
21 static_cast<PDFiumMemBufferFileWrite*>(this_file_write);
22 return mem_buffer_file_write->DoWriteBlock(data, size);
23 }
24
25 int PDFiumMemBufferFileWrite::DoWriteBlock(const void* data,
26 unsigned long size) {
27 buffer_.append(static_cast<const unsigned char*>(data), size);
28 return 1;
29 }
30
31
32 } // namespace chrome_pdf
33
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698