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

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

Issue 2828413005: Clang format pdf/ (Closed)
Patch Set: Manual tweaks Created 3 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 | « pdf/pdfium/pdfium_mem_buffer_file_read.cc ('k') | pdf/pdfium/pdfium_mem_buffer_file_write.cc » ('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 (c) 2010 The Chromium Authors. All rights reserved. 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 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 #ifndef PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_ 5 #ifndef PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_H_
6 #define PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_ 6 #define PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "third_party/pdfium/public/fpdf_save.h" 12 #include "third_party/pdfium/public/fpdf_save.h"
13 13
14 namespace chrome_pdf { 14 namespace chrome_pdf {
15 15
16 // Implementation of FPDF_FILEWRITE into a memory buffer. 16 // Implementation of FPDF_FILEWRITE into a memory buffer.
17 class PDFiumMemBufferFileWrite : public FPDF_FILEWRITE { 17 class PDFiumMemBufferFileWrite : public FPDF_FILEWRITE {
18 public: 18 public:
19 PDFiumMemBufferFileWrite(); 19 PDFiumMemBufferFileWrite();
20 ~PDFiumMemBufferFileWrite(); 20 ~PDFiumMemBufferFileWrite();
21 21
22 const std::basic_string<unsigned char>& buffer() { return buffer_; } 22 const std::basic_string<unsigned char>& buffer() { return buffer_; }
23 size_t size() { return buffer_.size(); } 23 size_t size() { return buffer_.size(); }
24 24
25 private: 25 private:
26 int DoWriteBlock(const void* data, unsigned long size); 26 int DoWriteBlock(const void* data, unsigned long size);
27 static int WriteBlockImpl(FPDF_FILEWRITE* this_file_write, const void* data, 27 static int WriteBlockImpl(FPDF_FILEWRITE* this_file_write,
28 const void* data,
28 unsigned long size); 29 unsigned long size);
29 30
30 std::basic_string<unsigned char> buffer_; 31 std::basic_string<unsigned char> buffer_;
31 }; 32 };
32 33
33 } // namespace chrome_pdf 34 } // namespace chrome_pdf
34 35
35 #endif // PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_ 36 #endif // PDF_PDFIUM_PDFIUM_MEM_BUFFER_FILE_WRITE_H_
36
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_mem_buffer_file_read.cc ('k') | pdf/pdfium/pdfium_mem_buffer_file_write.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698