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

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

Issue 485413002: Extracted method to CreateSinglePageRasterPdf() to simplify PrintPagesAsRasterPDF(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue Aug 19 18:41:30 PDT 2014 Created 6 years, 4 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
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_engine.cc » ('j') | pdf/pdfium/pdfium_engine.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_ENGINE_H_ 5 #ifndef PDF_PDFIUM_PDFIUM_ENGINE_H_
6 #define PDF_PDFIUM_PDFIUM_ENGINE_H_ 6 #define PDF_PDFIUM_PDFIUM_ENGINE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 int current_page); 229 int current_page);
230 230
231 // Input event handlers. 231 // Input event handlers.
232 bool OnMouseDown(const pp::MouseInputEvent& event); 232 bool OnMouseDown(const pp::MouseInputEvent& event);
233 bool OnMouseUp(const pp::MouseInputEvent& event); 233 bool OnMouseUp(const pp::MouseInputEvent& event);
234 bool OnMouseMove(const pp::MouseInputEvent& event); 234 bool OnMouseMove(const pp::MouseInputEvent& event);
235 bool OnKeyDown(const pp::KeyboardInputEvent& event); 235 bool OnKeyDown(const pp::KeyboardInputEvent& event);
236 bool OnKeyUp(const pp::KeyboardInputEvent& event); 236 bool OnKeyUp(const pp::KeyboardInputEvent& event);
237 bool OnChar(const pp::KeyboardInputEvent& event); 237 bool OnChar(const pp::KeyboardInputEvent& event);
238 238
239 FPDF_DOCUMENT CreateSinglePageRasterPdf(
240 double source_page_width,
241 double source_page_height,
242 const PP_PrintSettings_Dev& print_settings,
243 PDFiumPage* page_to_print);
244
239 pp::Buffer_Dev PrintPagesAsRasterPDF( 245 pp::Buffer_Dev PrintPagesAsRasterPDF(
240 const PP_PrintPageNumberRange_Dev* page_ranges, 246 const PP_PrintPageNumberRange_Dev* page_ranges,
241 uint32_t page_range_count, 247 uint32_t page_range_count,
242 const PP_PrintSettings_Dev& print_settings); 248 const PP_PrintSettings_Dev& print_settings);
249
243 pp::Buffer_Dev PrintPagesAsPDF(const PP_PrintPageNumberRange_Dev* page_ranges, 250 pp::Buffer_Dev PrintPagesAsPDF(const PP_PrintPageNumberRange_Dev* page_ranges,
244 uint32_t page_range_count, 251 uint32_t page_range_count,
245 const PP_PrintSettings_Dev& print_settings); 252 const PP_PrintSettings_Dev& print_settings);
253
246 pp::Buffer_Dev GetFlattenedPrintData(const FPDF_DOCUMENT& doc); 254 pp::Buffer_Dev GetFlattenedPrintData(const FPDF_DOCUMENT& doc);
247 void FitContentsToPrintableAreaIfRequired( 255 void FitContentsToPrintableAreaIfRequired(
248 const FPDF_DOCUMENT& doc, 256 const FPDF_DOCUMENT& doc,
249 const PP_PrintSettings_Dev& print_settings); 257 const PP_PrintSettings_Dev& print_settings);
250 void SaveSelectedFormForPrint(); 258 void SaveSelectedFormForPrint();
251 259
252 // Given a mouse event, returns which page and character location it's closest 260 // Given a mouse event, returns which page and character location it's closest
253 // to. 261 // to.
254 PDFiumPage::Area GetCharIndex(const pp::MouseInputEvent& event, 262 PDFiumPage::Area GetCharIndex(const pp::MouseInputEvent& event,
255 int* page_index, 263 int* page_index,
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 625
618 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. 626 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details.
619 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, 627 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer,
620 int pdf_buffer_size, int page_number, 628 int pdf_buffer_size, int page_number,
621 double* width, double* height); 629 double* width, double* height);
622 }; 630 };
623 631
624 } // namespace chrome_pdf 632 } // namespace chrome_pdf
625 633
626 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_ 634 #endif // PDF_PDFIUM_PDFIUM_ENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_engine.cc » ('j') | pdf/pdfium/pdfium_engine.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698