OLD | NEW |
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_PDF_ENGINE_H_ | 5 #ifndef PDF_PDF_ENGINE_H_ |
6 #define PDF_PDF_ENGINE_H_ | 6 #define PDF_PDF_ENGINE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 bool keep_aspect_ratio; | 326 bool keep_aspect_ratio; |
327 bool center_in_bounds; | 327 bool center_in_bounds; |
328 bool autorotate; | 328 bool autorotate; |
329 }; | 329 }; |
330 | 330 |
331 PDFEngineExports() {} | 331 PDFEngineExports() {} |
332 virtual ~PDFEngineExports() {} | 332 virtual ~PDFEngineExports() {} |
333 static PDFEngineExports* Get(); | 333 static PDFEngineExports* Get(); |
334 | 334 |
335 #if defined(OS_WIN) | 335 #if defined(OS_WIN) |
336 // See the definitions of the corresponding functions in pdf.h for details. | 336 // See the definition of RenderPDFPageToDC in pdf.cc for details. |
337 virtual bool RenderPDFPageToDC(void* pdf_handle, | 337 virtual bool RenderPDFPageToDC(const void* pdf_buffer, |
| 338 int buffer_size, |
338 int page_number, | 339 int page_number, |
339 const RenderingSettings& settings, | 340 const RenderingSettings& settings, |
340 HDC dc) = 0; | 341 HDC dc) = 0; |
341 | 342 |
342 virtual void SetPDFEnsureTypefaceCharactersAccessible( | 343 virtual void SetPDFEnsureTypefaceCharactersAccessible( |
343 PDFEnsureTypefaceCharactersAccessible func) = 0; | 344 PDFEnsureTypefaceCharactersAccessible func) = 0; |
344 | 345 |
345 virtual void SetPDFUseGDIPrinting(bool enable) = 0; | 346 virtual void SetPDFUseGDIPrinting(bool enable) = 0; |
346 #endif // defined(OS_WIN) | 347 #endif // defined(OS_WIN) |
347 | 348 |
348 virtual bool RenderPDFPageToBitmap(void* pdf_handle, | 349 // See the definition of RenderPDFPageToBitmap in pdf.cc for details. |
| 350 virtual bool RenderPDFPageToBitmap(const void* pdf_buffer, |
| 351 int pdf_buffer_size, |
349 int page_number, | 352 int page_number, |
350 const RenderingSettings& settings, | 353 const RenderingSettings& settings, |
351 void* bitmap_buffer) = 0; | 354 void* bitmap_buffer) = 0; |
352 | 355 |
353 virtual bool GetPDFDocInfo(const void* pdf_buffer, | 356 virtual bool GetPDFDocInfo(const void* pdf_buffer, |
354 int buffer_size, | 357 int buffer_size, |
355 int* page_count, | 358 int* page_count, |
356 double* max_page_width, | 359 double* max_page_width) = 0; |
357 void** pdf_handle) = 0; | |
358 | 360 |
359 virtual void ReleasePDFHandle(void* pdf_handle) = 0; | 361 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
360 | 362 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
361 virtual bool GetPDFPageSizeByIndex(void* pdf_handle, | 363 int pdf_buffer_size, |
362 int page_number, | 364 int page_number, |
363 double* width, | 365 double* width, |
364 double* height) = 0; | 366 double* height) = 0; |
365 }; | 367 }; |
366 | 368 |
367 } // namespace chrome_pdf | 369 } // namespace chrome_pdf |
368 | 370 |
369 #endif // PDF_PDF_ENGINE_H_ | 371 #endif // PDF_PDF_ENGINE_H_ |
OLD | NEW |