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 definition of RenderPDFPageToDC in pdf.cc for details. | 336 // See the definitions of the corresponding functions in pdf.h for details. |
337 virtual bool RenderPDFPageToDC(const void* pdf_buffer, | 337 virtual bool RenderPDFPageToDC(void* pdf_handle, |
338 int buffer_size, | |
339 int page_number, | 338 int page_number, |
340 const RenderingSettings& settings, | 339 const RenderingSettings& settings, |
341 HDC dc) = 0; | 340 HDC dc) = 0; |
342 | 341 |
343 virtual void SetPDFEnsureTypefaceCharactersAccessible( | 342 virtual void SetPDFEnsureTypefaceCharactersAccessible( |
344 PDFEnsureTypefaceCharactersAccessible func) = 0; | 343 PDFEnsureTypefaceCharactersAccessible func) = 0; |
345 | 344 |
346 virtual void SetPDFUseGDIPrinting(bool enable) = 0; | 345 virtual void SetPDFUseGDIPrinting(bool enable) = 0; |
347 #endif // defined(OS_WIN) | 346 #endif // defined(OS_WIN) |
348 | 347 |
349 // See the definition of RenderPDFPageToBitmap in pdf.cc for details. | 348 virtual bool RenderPDFPageToBitmap(void* pdf_handle, |
350 virtual bool RenderPDFPageToBitmap(const void* pdf_buffer, | |
351 int pdf_buffer_size, | |
352 int page_number, | 349 int page_number, |
353 const RenderingSettings& settings, | 350 const RenderingSettings& settings, |
354 void* bitmap_buffer) = 0; | 351 void* bitmap_buffer) = 0; |
355 | 352 |
356 virtual bool GetPDFDocInfo(const void* pdf_buffer, | 353 virtual bool GetPDFDocInfo(const void* pdf_buffer, |
357 int buffer_size, | 354 int buffer_size, |
358 int* page_count, | 355 int* page_count, |
359 double* max_page_width) = 0; | 356 double* max_page_width, |
| 357 void** pdf_handle) = 0; |
360 | 358 |
361 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 359 virtual void ReleasePDFHandle(void* pdf_handle) = 0; |
362 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 360 |
363 int pdf_buffer_size, int page_number, | 361 virtual bool GetPDFPageSizeByIndex(void* pdf_handle, |
364 double* width, double* height) = 0; | 362 int page_number, |
| 363 double* width, |
| 364 double* height) = 0; |
365 }; | 365 }; |
366 | 366 |
367 } // namespace chrome_pdf | 367 } // namespace chrome_pdf |
368 | 368 |
369 #endif // PDF_PDF_ENGINE_H_ | 369 #endif // PDF_PDF_ENGINE_H_ |
OLD | NEW |