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 11 matching lines...) Expand all Loading... |
22 #include "ppapi/c/dev/ppp_printing_dev.h" | 22 #include "ppapi/c/dev/ppp_printing_dev.h" |
23 #include "ppapi/c/ppb_input_event.h" | 23 #include "ppapi/c/ppb_input_event.h" |
24 #include "ppapi/cpp/completion_callback.h" | 24 #include "ppapi/cpp/completion_callback.h" |
25 #include "ppapi/cpp/image_data.h" | 25 #include "ppapi/cpp/image_data.h" |
26 #include "ppapi/cpp/rect.h" | 26 #include "ppapi/cpp/rect.h" |
27 #include "ppapi/cpp/size.h" | 27 #include "ppapi/cpp/size.h" |
28 #include "ppapi/cpp/url_loader.h" | 28 #include "ppapi/cpp/url_loader.h" |
29 #include "ppapi/cpp/var_array.h" | 29 #include "ppapi/cpp/var_array.h" |
30 #include "ui/base/window_open_disposition.h" | 30 #include "ui/base/window_open_disposition.h" |
31 | 31 |
| 32 #if defined(OS_WIN) |
| 33 typedef void (*PDFEnsureTypefaceCharactersAccessible)(const LOGFONT* font, |
| 34 const wchar_t* text, |
| 35 size_t text_length); |
| 36 #endif |
| 37 |
32 namespace pp { | 38 namespace pp { |
33 class InputEvent; | 39 class InputEvent; |
34 class VarDictionary; | 40 class VarDictionary; |
35 } | 41 } |
36 | 42 |
37 namespace chrome_pdf { | 43 namespace chrome_pdf { |
38 | 44 |
39 class Stream; | 45 class Stream; |
40 | 46 |
41 // Do one time initialization of the SDK. | 47 // Do one time initialization of the SDK. |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 virtual ~PDFEngineExports() {} | 328 virtual ~PDFEngineExports() {} |
323 static PDFEngineExports* Get(); | 329 static PDFEngineExports* Get(); |
324 | 330 |
325 #if defined(OS_WIN) | 331 #if defined(OS_WIN) |
326 // See the definition of RenderPDFPageToDC in pdf.cc for details. | 332 // See the definition of RenderPDFPageToDC in pdf.cc for details. |
327 virtual bool RenderPDFPageToDC(const void* pdf_buffer, | 333 virtual bool RenderPDFPageToDC(const void* pdf_buffer, |
328 int buffer_size, | 334 int buffer_size, |
329 int page_number, | 335 int page_number, |
330 const RenderingSettings& settings, | 336 const RenderingSettings& settings, |
331 HDC dc) = 0; | 337 HDC dc) = 0; |
332 #endif // OS_WIN | 338 |
| 339 virtual void SetPDFEnsureTypefaceCharactersAccessible( |
| 340 PDFEnsureTypefaceCharactersAccessible func) = 0; |
| 341 |
| 342 virtual void SetPDFUseGDIPrinting(bool enable) = 0; |
| 343 #endif // defined(OS_WIN) |
| 344 |
333 // See the definition of RenderPDFPageToBitmap in pdf.cc for details. | 345 // See the definition of RenderPDFPageToBitmap in pdf.cc for details. |
334 virtual bool RenderPDFPageToBitmap(const void* pdf_buffer, | 346 virtual bool RenderPDFPageToBitmap(const void* pdf_buffer, |
335 int pdf_buffer_size, | 347 int pdf_buffer_size, |
336 int page_number, | 348 int page_number, |
337 const RenderingSettings& settings, | 349 const RenderingSettings& settings, |
338 void* bitmap_buffer) = 0; | 350 void* bitmap_buffer) = 0; |
339 | 351 |
340 virtual bool GetPDFDocInfo(const void* pdf_buffer, | 352 virtual bool GetPDFDocInfo(const void* pdf_buffer, |
341 int buffer_size, | 353 int buffer_size, |
342 int* page_count, | 354 int* page_count, |
343 double* max_page_width) = 0; | 355 double* max_page_width) = 0; |
344 | 356 |
345 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. | 357 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. |
346 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, | 358 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, |
347 int pdf_buffer_size, int page_number, | 359 int pdf_buffer_size, int page_number, |
348 double* width, double* height) = 0; | 360 double* width, double* height) = 0; |
349 }; | 361 }; |
350 | 362 |
351 } // namespace chrome_pdf | 363 } // namespace chrome_pdf |
352 | 364 |
353 #endif // PDF_PDF_ENGINE_H_ | 365 #endif // PDF_PDF_ENGINE_H_ |
OLD | NEW |