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

Side by Side Diff: pdf/pdf_engine.h

Issue 2114583002: Windows: Make it possible to print text with GDI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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_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 10 matching lines...) Expand all
21 #include "ppapi/c/dev/pp_cursor_type_dev.h" 21 #include "ppapi/c/dev/pp_cursor_type_dev.h"
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 30
31 #if defined(OS_WIN)
32 typedef void (*PDFEnsureTypefaceCharactersAccessible)(const LOGFONT& font,
33 const wchar_t* text,
34 size_t text_length);
35 #endif
36
31 namespace pp { 37 namespace pp {
32 class InputEvent; 38 class InputEvent;
33 class VarDictionary; 39 class VarDictionary;
34 } 40 }
35 41
36 namespace chrome_pdf { 42 namespace chrome_pdf {
37 43
38 class Stream; 44 class Stream;
39 45
40 #if defined(OS_MACOSX) 46 #if defined(OS_MACOSX)
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 virtual ~PDFEngineExports() {} 336 virtual ~PDFEngineExports() {}
331 static PDFEngineExports* Get(); 337 static PDFEngineExports* Get();
332 338
333 #if defined(OS_WIN) 339 #if defined(OS_WIN)
334 // See the definition of RenderPDFPageToDC in pdf.cc for details. 340 // See the definition of RenderPDFPageToDC in pdf.cc for details.
335 virtual bool RenderPDFPageToDC(const void* pdf_buffer, 341 virtual bool RenderPDFPageToDC(const void* pdf_buffer,
336 int buffer_size, 342 int buffer_size,
337 int page_number, 343 int page_number,
338 const RenderingSettings& settings, 344 const RenderingSettings& settings,
339 HDC dc) = 0; 345 HDC dc) = 0;
340 #endif // OS_WIN 346
347 virtual void SetPDFEnsureTypefaceCharactersAccessible(
348 PDFEnsureTypefaceCharactersAccessible func) = 0;
349
350 virtual void SetPDFUseGDIPrinting(bool enable) = 0;
351 #endif // defined(OS_WIN)
352
341 // See the definition of RenderPDFPageToBitmap in pdf.cc for details. 353 // See the definition of RenderPDFPageToBitmap in pdf.cc for details.
342 virtual bool RenderPDFPageToBitmap(const void* pdf_buffer, 354 virtual bool RenderPDFPageToBitmap(const void* pdf_buffer,
343 int pdf_buffer_size, 355 int pdf_buffer_size,
344 int page_number, 356 int page_number,
345 const RenderingSettings& settings, 357 const RenderingSettings& settings,
346 void* bitmap_buffer) = 0; 358 void* bitmap_buffer) = 0;
347 359
348 virtual bool GetPDFDocInfo(const void* pdf_buffer, 360 virtual bool GetPDFDocInfo(const void* pdf_buffer,
349 int buffer_size, 361 int buffer_size,
350 int* page_count, 362 int* page_count,
351 double* max_page_width) = 0; 363 double* max_page_width) = 0;
352 364
353 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details. 365 // See the definition of GetPDFPageSizeByIndex in pdf.cc for details.
354 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer, 366 virtual bool GetPDFPageSizeByIndex(const void* pdf_buffer,
355 int pdf_buffer_size, int page_number, 367 int pdf_buffer_size, int page_number,
356 double* width, double* height) = 0; 368 double* width, double* height) = 0;
357 }; 369 };
358 370
359 } // namespace chrome_pdf 371 } // namespace chrome_pdf
360 372
361 #endif // PDF_PDF_ENGINE_H_ 373 #endif // PDF_PDF_ENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698