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

Side by Side Diff: pdf/pdfium/pdfium_mem_buffer_file_write.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 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 #ifndef PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_
6 #define PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_
7
8 #include <string>
9
10 #include "third_party/pdfium/fpdfsdk/include/fpdfsave.h"
11
12 namespace chrome_pdf {
13
14 // Implementation of FPDF_FILEWRITE into a memory buffer.
15 class PDFiumMemBufferFileWrite : public FPDF_FILEWRITE {
16 public:
17 PDFiumMemBufferFileWrite();
18 ~PDFiumMemBufferFileWrite();
19
20 const std::basic_string<unsigned char>& buffer() { return buffer_; }
21 size_t size() { return buffer_.size(); }
22
23 private:
24 int DoWriteBlock(const void* data, unsigned long size);
25 static int WriteBlockImpl(FPDF_FILEWRITE* this_file_write, const void* data,
26 unsigned long size);
27
28 std::basic_string<unsigned char> buffer_;
29 };
30
31 } // namespace chrome_pdf
32
33 #endif // PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_
34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698